Joma Rajab

Joma Rajab

  • 1.8k
  • 110
  • 18.6k

How to write code behind for hyper link tag

Aug 26 2016 9:44 AM
I am trying to use hyperlink tag and I need to write code behind for that , which shows and hide place holder when I click the link 
 
please help  
Thanks  
 
  1. <asp:HyperLink id="linkbtn" runat="server" Text="Forgot Password?"  OnClick="link1_Click"></asp:HyperLink>  
  2.                        <asp:PlaceHolder ID="typeEmail" runat="server" Visible="false">  
  3.                        <asp:TextBox ID="textbox1" Visible="true" runat="server" AutoComplete="off">  
  4.                        </asp:TextBox>  
  5.                        </asp:PlaceHolder>  
  6.   
  7.   
  8.   
  9.   
  10.   
  11. protected void link1_Click(object sender, EventArgs e)  
  12.    {  
  13.         typeEmail.Visible = true;  
  14.        textbox1.Visible = true;  
  15.         }  
 

Answers (3)