T
tshad
Is there a way for a User Control to access an object (such as label or
textbox) on the .aspx page that calls it?
For example:
x.aspx
**************************************
....
Sub Page_Load(s as Object, e as EventArgs)
LoadControl("x.ascx")
End Sub
....
<asp:Label ID="theLabel" runat="server"/>
**************************************
x.ascx
**************************************
Sub Page_Load(s as Object,e as EventArgs)
theLabel.Text = "Some Text"
End Sub
****************************************
This would get me the error:
Name 'MessageOutside' is not declared
I know how to access methods and properties in the User Control from the
..aspx page, but not the other way around.
Thanks,
Tom
textbox) on the .aspx page that calls it?
For example:
x.aspx
**************************************
....
Sub Page_Load(s as Object, e as EventArgs)
LoadControl("x.ascx")
End Sub
....
<asp:Label ID="theLabel" runat="server"/>
**************************************
x.ascx
**************************************
Sub Page_Load(s as Object,e as EventArgs)
theLabel.Text = "Some Text"
End Sub
****************************************
This would get me the error:
Name 'MessageOutside' is not declared
I know how to access methods and properties in the User Control from the
..aspx page, but not the other way around.
Thanks,
Tom