Mega Code Archive

 
Categories / ASP.Net / Asp Control
 

Boolean value toggle

<%@ Page Language="C#" Debug="true" %> <script runat="server">     void Page_Load()     {        if (Page.IsPostBack)          lblOut.Visible = !lblOut.Visible;     } </script> <html> <head> </head> <body>     <form runat="server">         Click Submit several times          <asp:Button id="Button1" runat="server" Text="Submit"></asp:Button>         <asp:Label id="lblOut" runat="server" text="See Me"></asp:Label>     </form> </body> </html>