Ways of Hiding or Showing any Controls in Javascript.

Posted by vishalneeraj-24503 under CSS 3 category on | Points: 40 | Views : 728
There are 2 ways of hiding/showing controls in Javascript.
With Display:none and Visibility:hidden style property and Display:block or Display:'' and Visibility:visible style property,we can Hide/Show any Controls.

Example of Showing Controls:-
<asp:Label ID="lbl_employee_id" runat="server" Text="Id" style="display:block;" ></asp:Label>

<asp:Button ID="btn_submit" runat="server" Text="Submit" style="display:'';" />

<asp:DropDownList ID="ddl_employee_name" runat="server" style="visibility:visible;" >

Example of Hiding Controls:-
<asp:TextBox ID="txt_salary" runat="server" style="display:none;"></asp:TextBox>

<asp:TextBox ID="txt_price" runat="server" style="visibility:hidden;" ></asp:TextBox>

Comments or Responses

Login to post response