J
Joey
asp.net 2/C#/VS2005
How do i set the text property for a label control on my master page?
I am able to use...
this.Master.FindControl("lblMyLabel").Visible = false;
....to hide the label. That works fine. However, when trying to set the
text property, I can see there is no "Text" property. So I thought a
cast would work...
((Label)(this.Master.FindControl("lblMyLabel")).Text = "My Text";
....but when I do this nothing happens. No error...just nothing.
What am I doing wrong?
JP
How do i set the text property for a label control on my master page?
I am able to use...
this.Master.FindControl("lblMyLabel").Visible = false;
....to hide the label. That works fine. However, when trying to set the
text property, I can see there is no "Text" property. So I thought a
cast would work...
((Label)(this.Master.FindControl("lblMyLabel")).Text = "My Text";
....but when I do this nothing happens. No error...just nothing.
What am I doing wrong?
JP