Janu526
asked on
How to handle display of a button from a user control in another user control's Update Panel?
I'm using VB.NET for my application. I have an update panel in an user control which uses another 2 user controls
<asp:UpdatePanel ID="UpdatePanelID" runat="server">
<ContentTemplate>
<uc1:UserfirstControl ID="UserfirstControl1" runat="server" />
<br />
<uc2:UserSecondControl ID="UserSecondControl2"
runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
My UserfirstControl has 2 buttons (button1 & button2) and I'm looking to hide one button (button2) in the code behind file(UpdatePanel's Usercontrol Code Behind) based on some condition. Can I able to hide/invisible that button?
Thanks
<asp:UpdatePanel ID="UpdatePanelID" runat="server">
<ContentTemplate>
<uc1:UserfirstControl ID="UserfirstControl1" runat="server" />
<br />
<uc2:UserSecondControl ID="UserSecondControl2"
runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
My UserfirstControl has 2 buttons (button1 & button2) and I'm looking to hide one button (button2) in the code behind file(UpdatePanel's Usercontrol Code Behind) based on some condition. Can I able to hide/invisible that button?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
In code behind just use below code based on your condition:
Open in new window
HTH.