G
Guest
Hello,
I'd like to reference a control in a user control that is not in the user
control. For esample, if I had the following in my .aspx:
....
<html>
<form ID="frmMain"....>
...
<asp:Label ID="lblMessage" ...>...</asp:Label>
<uc:MyUserControl ID="ucTest"...></uc:MyUserControl>
...
</form>
</html>
....
In any code behind routine of my user control ucTest I'd like to set:
lblMessage.Text = "Hello"
But the user control doesn't 'see' the label. I can write an algorithm/code
to cycle through all page controls to get the reference of the control I
want, but is there an easier way?
Much oblige - Hedge
I'd like to reference a control in a user control that is not in the user
control. For esample, if I had the following in my .aspx:
....
<html>
<form ID="frmMain"....>
...
<asp:Label ID="lblMessage" ...>...</asp:Label>
<uc:MyUserControl ID="ucTest"...></uc:MyUserControl>
...
</form>
</html>
....
In any code behind routine of my user control ucTest I'd like to set:
lblMessage.Text = "Hello"
But the user control doesn't 'see' the label. I can write an algorithm/code
to cycle through all page controls to get the reference of the control I
want, but is there an easier way?
Much oblige - Hedge