M
Micke Palm
Hi!
I want to use a parent page and load webusercontrols to this page dynamically. The problem I got is how I can set a label.text in parent page from a usercontrol.
A scenenario is if I have a button into the usercontrol and want to set a text to a label in the parents page. I've set the click_sub to public and the label to friend so I can se it, but when I try to dedicate a text I got this error.
Object reference not set to an instance of an object.
My declaration is ...
Dim test As New myParentClass
test.ChangedBy.Text = "Ett test"
Do anyone have a clue how I can do this. I have also test with a property and I succeed to dedicate the value to the property ,but how can I get it to the label. Maybe I need reload the parent page?
Maybe sessions are a better way to move the data??
/regards, Micke
I want to use a parent page and load webusercontrols to this page dynamically. The problem I got is how I can set a label.text in parent page from a usercontrol.
A scenenario is if I have a button into the usercontrol and want to set a text to a label in the parents page. I've set the click_sub to public and the label to friend so I can se it, but when I try to dedicate a text I got this error.
Object reference not set to an instance of an object.
My declaration is ...
Dim test As New myParentClass
test.ChangedBy.Text = "Ett test"
Do anyone have a clue how I can do this. I have also test with a property and I succeed to dedicate the value to the property ,but how can I get it to the label. Maybe I need reload the parent page?
Maybe sessions are a better way to move the data??
/regards, Micke