CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: NewsGroup Date Entered: 3/27/2007 4:03:27 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 42 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
ajw
Asp.Net User
Autoeventwireup and profile3/27/2007 4:03:27 PM

0/0

I have a some profile values which are being declared inside a loginview.

 I also have a custom control which displays a profile address. 

My issue is that in order to display the control populated with the profile informaiton I need to set autoeventwireup to true.  But when I do this then an exception is thrown "value of instance not set to instance of object" -- for Label1.Text = Profile.CompanyName etc....  If I set autoeventwireup to false the profile information is displayed fine.

This is the code behind of the page. 

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

        If Not Page.IsPostBack Then
            Dim Label1 As Label = CType(LoginView1.FindControl("Label1"), Label)
            Dim Label2 As Label = CType(LoginView1.FindControl("Label2"), Label)
            Dim Label3 As Label = CType(LoginView1.FindControl("Label3"), Label)
            Dim Label4 As Label = CType(LoginView1.FindControl("Label4"), Label)
            Dim Label5 As Label = CType(LoginView1.FindControl("Label5"), Label)
            Dim Label6 As Label = CType(LoginView1.FindControl("Label6"), Label)
            Dim Label7 As Label = CType(LoginView1.FindControl("Label7"), Label)
            Dim AddressDetailsInfo As ASP.displayaddress_ascx = CType(LoginView1.FindControl("AddressDetailsInfo"), ASP.displayaddress_ascx)
            AddressDetailsInfo.AssignAddress(Profile.AddressDetails)
            Label1.Text = Profile.CompanyName
            Label2.Text = Profile.Address
            Label3.Text = Profile.Telephone
            Label4.Text = Profile.Website
            Label5.Text = Profile.Postcode
            Label6.Text = Profile.Email
            Label7.Text = Profile.Fullname
        End If
    End Sub

 

Any ideas?

Thanks

Andrew


Current project: Abtec Network Systems
vvsharma
Asp.Net User
Re: Autoeventwireup and profile3/27/2007 6:53:54 PM

0/0

I dont think autoeventwireup has anything to do with the error.Is your 'Page_Load' being called with autoeventwireup=false?


Vikram.S, Developer

DiscountASP.NET

Innovative ASP.NET Hosting & SQL Hosting
ajw
Asp.Net User
Re: Autoeventwireup and profile3/28/2007 8:10:53 AM

0/0

I had a label undeclared.  Doh!
Current project: Abtec Network Systems
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visual C# 2005: A Developer's Notebook Authors: Jesse Liberty, Pages: 221, Published: 2005
Creating and Consuming Web Services in Visual Basic Authors: Scott Seely, Eric A. Smith, Deon Schaffer, Pages: 408, Published: 2001
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. LeBlond, Pages: 989, Published: 2005
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
Microsoft Visual C# 2005 Unleashed Authors: Kevin Hoffman, Pages: 692, Published: 2006
Programming Visual Basic 2005 Authors: Jesse Liberty, Pages: 548, Published: 2005
ASP.NET 2.0 Black Book: black book Authors: Dreamtech Software, Dreamtech Software, Charul Shukla, Anil Kumar Barnwal, Dreamtech Software India, Pages: 1167, Published: 2006
Pro ASP.NET for SQL Server: High Performance Data Access for Web Developers Authors: Brennan Stehling, Pages: 408, Published: 2007
Building Distributed Applications with Visual Basic.NET Authors: Dan Fox, Pages: 763, Published: 2002

Web:
Autoeventwireup and profile - ng.asp-net-forum ... Autoeventwireup and profile, > ROOT > NEWSGROUP > Asp.Net Forum > general_asp. net.web_parts_and_personalization, Date: 3/27/2007 4:03:27 PM, Replies: 2, ...
AutoEventWireup Attribute We can specify the default value of the AutoEventWireup attribute in the following .... comments or join the community to create your free profile today! ...
what is AutoEventWireUp in .aspx page in @page directive My Profile. Sign In · Register · AdSense Revenue ... AutoEventWireup is an attribute in Page directive. It's a Boolean attribute which ...
Ale Riolo's blog: AutoEventWireup is evil! Sep 4, 2007 ... Web, and to put inside a folder called AutoEventWireup an ASP.Net page called True.aspx, ..... View my complete profile ...
Hocke - Thoughts, Tutorials, Tips and Tricks: AutoEventWireup=true If you specify the attribute AutoEventWireup=True on a Web User Control or a Page, .... Håkan Canberger .Net developer. View my complete profile ...
experimenting AutoEventWireup="false" - SitePoint Forums experimenting AutoEventWireup="false" .NET. ... Chroniclemaster1. View Public Profile · Visit Chroniclemaster1's homepage! ...
Feedback: AutoEventWireup="false" by default in sub-master page Sep 25, 2007 ... Welcome, guest Sign in | Your Profile | Help ... AutoEventWireUp="false" in the Master declaration at top of page. Expected Results ...
Hi, basic question about AutoEventWireup C# Friends Aug 7, 2008 ... i know that AutoEventWireup is responsible for binding the events to ... AutoEventWireup = "false" // C# code behind, no Handles clause ...
AutoEventWireup=False stops dynamic master page attempt - ASP.NET ... AutoEventWireup=False stops dynamic master page attempt ... method of the page ( I'm using a Profile variable just like he describes). ...
AutoEventwireup - ASP AutoEventwireup - ASP Community and Forum - Our ASP forum is the place ... View Public Profile · Send a private message to narender_gandi ...




Search This Site:










saving site template for 2.12

ctrl-c: add to toolbox??

4.0 with asp 2.0 ; & vs 2005 std ed adding sql db gives error

re: using multiple sitemaps

problem seperating content from skin ?

adding an image dynamically to a zone

authentication and cookies problems

how to attach to treenodecollapsed and expanded using adapter

i ve got system.security.securityexception: request for the permission of type 'system.net.mail.smtppermission, system, version=2.0.0.0, failed. exception

vwd installation fails!

ttt forum - formating tags

cache timeout suggestion

can we pin a disclaimer ?

callback in contentplaceholder

uploading a picture

basic file i/o using hosting provider (godaddy.com) in "medium trust' environment.

edit module which replicate by using copytab with contents

nested actions in modules

dnn 3.3 & 3.3.1

new free skin - xdfuseme

error upgrading 3.1.1 to 3.2

"membership credential verification failed" with iis but not with cassini

is it possible to develop custom modules in c# rather than vb

bug in asp migration tool

"add new..." shortcut menu not showing

giving value to master page contents

vs2005 broken after hibernate?

general access denied while removing a user from a group.

comparing dnn storefront products

problems installing dnn 2.1.2 on local computer and using web matrix

 
All Times Are GMT