asp.net 2
Hi
Could anyone suggest why ths bit of code would cause 'Oject referenece not set to instance of an object' message?
There is most definitely a label with ID 'lblSlot1' on the page. The page is a content of a master page if thats significant, but not I'm trying to reference controls on one from the other or anything like that.
myString = "lblSlot1";
Label myLabel = ((Label)(Page.FindControl(myString)));
myLabel.Text = "test text";
Thanks!
Hi
Could anyone suggest why ths bit of code would cause 'Oject referenece not set to instance of an object' message?
There is most definitely a label with ID 'lblSlot1' on the page. The page is a content of a master page if thats significant, but not I'm trying to reference controls on one from the other or anything like that.
myString = "lblSlot1";
Label myLabel = ((Label)(Page.FindControl(myString)));
myLabel.Text = "test text";
Thanks!