1. I have a blank test page. On the page load, it does this:
UserControl c1 = (UserControl)LoadControl("control1.ascx");
2. I have control1.ascx.cs On the ascx side: i have this single literal:
<asp:Literal ID="litTest1" runat="server" Text="Hello World" />
On the page load, it does:
UserControl c2 = (UserControl)LoadControl("control2.ascx");
3. i have control2.ascx.cs On the ascx side: I have the following literal:
<asp:Literal ID="litTest2" runat="server" Text="Hello Universe" />
on the ascx.cs side it has:
public string sTest2 = "Hello Existence";
The literals I added was to ensure that the page calls control1 and control1 is calling control2, which it does. On execution I get to see hello World & Hello universe messages, no problem, but NOW, I am trying to get the variable sTest on control2 inside the page load of control1. I want to be able to set that variable from control1.
is that possible? If so, how?