Jump to content

Object reference not set to an instance of an obje


cyrus_

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 comment
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 comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...