Jump to content

Object reference not set to an instance of an obje


Recommended Posts

i want to change values of controls in a User Control when i click on a button in a another user control, but i get following error:Object reference not set to an instance of an objectCode://in My DownUserControl i callprotected void BTN_Click(object sender, EventArgs e){ TopUserControl TopUC = new TopUserControl(); TopUC.Title = "hello";}//and here I get the error in the TopUserControl:public string Title{ get { return TitleLable.Text } set { TitleLable.Text = value }}

Link to post
Share on other sites
can you post the full erro and the full code.It is trying to process an object that is null or doesn't exist

I am working with webparts 2.0,I have a aspx file that has a user control (uc1) in a WebPartZone in the uc1 i have another WebpartZone that contains another Ucer Control (uc2)my code is so long do you want to send it to you?thanks for your answer
Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...