suicidaltendencies
Programmer
Here is my problem. I'm putting 3 user controls on my page. In my page load function I'm specifying the visiblity of the user controls. 2 invisible and 1 visible. In the visible control there are buttons. I want the the other controls to be visible if the buttons are pressed. How do I detect the button was clicked on the visible usercontrol? What code should I write in my page?
Thanks,
Harold
Page section:
<pm:usercontrol id="usercontrol" runat="server" />
<pm:usercontrol id="Usercontrol1" runat="server" />
<pm:usercontrol id="Usercontrol2" runat="server" />
CodeBehind section:
private void Page_Load(object sender, System.EventArgs e)
{
Control usercontrol = Page.FindControl("usercontrol"
Control Usercontrol1 = Page.FindControl("Usercontrol1"
Control Usercontrol2 = Page.FindControl("Usercontrol2"
if(!Page.IsPostBack)
{
usercontrol.Visible=true;
Usercontrol1.Visible=false;
Usercontrol2 .Visible=false;
}
}
Thanks,
Harold
Page section:
<pm:usercontrol id="usercontrol" runat="server" />
<pm:usercontrol id="Usercontrol1" runat="server" />
<pm:usercontrol id="Usercontrol2" runat="server" />
CodeBehind section:
private void Page_Load(object sender, System.EventArgs e)
{
Control usercontrol = Page.FindControl("usercontrol"
Control Usercontrol1 = Page.FindControl("Usercontrol1"
Control Usercontrol2 = Page.FindControl("Usercontrol2"
if(!Page.IsPostBack)
{
usercontrol.Visible=true;
Usercontrol1.Visible=false;
Usercontrol2 .Visible=false;
}
}