Visibility of the control by code behind in ASP.NetHi Guys,
I just want to set the visibility of the button control through the code behind file. Can you please send me the code.
I am trying with the below code but it seems not able to get it.
Code behind file code:
public partial class Default2 : System.Web.UI.Page
public static bool IsVisible = true;
protected void Page_Load(object sender, EventArgs e)
IsVisible = false;
.aspx file code:
<asp:Button ID="Button1" Text="Help" runat="server" Visible="<%# !IsVisible %>" />
But it is not making the visible as false.
Thanks in advance.