I have a main page: Main.aspx and 2 user controls User1.ascx and User2.ascx. First, i want User2.ascx to be invisible.I have a hidden value in the main page control. And if value of hidden value is not null then show user2.ascx. I have typed the code in the prerender function on user2.ascx.
Currently, what I try
In Main.aspx
<usercontrol:User1 runat="server" ID="user1control" Visible = "false" />
By this, In User2, it comes only in pageload event but not in OnPreRender.
I have my all code in OnPreRender