Hide and Show Label and Button

trusty

New Member
I have 2 labels and 2 text boxes and 1 buttons displayed.When the page loads the \[code\]Name\[/code\] and \[code\]Button\[/code\] (will be initially displayed). Later when i click on the \[code\]Button\[/code\] i need to display the \[code\]age\[/code\] \[code\]label\[/code\] and \[code\]textbox\[/code\]. How can i do this ?\[code\]<ol> <li> <asp:Label runat="server" AssociatedControlID="Name"> User name </asp:Label> <asp:TextBox runat="server" ID="Name" Width="167px" /> <asp:Button ID="Button1" runat="server" Text="Button" /> </li> <li> <asp:Label runat="server" AssociatedControlID="age">age</asp:Label> <asp:TextBox runat="server" ID="age" TextMode="age" Width="240px" /> </li> </ol>\[/code\]code for button press\[code\]protected void Button1_Click(object sender, EventArgs e){}\[/code\]
 
Back
Top