title: How do I add a button click event to my own button in Visual Studio C#
body: <p>Is there a way to add a button click event to a button I create myself?</p>
  
  <p>I am using Visual Studio Premium 2013. I was trying to customise the appearance of the standard button control from the toolbox but it wasnt doing what I wanted (there were issues with border-radius and other things). So I decided to make my own button. Its a div, styled with this css and wrapped with an anchor tag:</p>
  
  <pre><code>&lt;a href="#"&gt;&lt;div id="loginBtn"&gt;Login&lt;/div&gt;&lt;/a&gt;                    
  
  #loginBtn {
      width: 60px;
      height: 30px;
      margin-left: auto;
      margin-right: auto;
      background: #3B647F;
      border: 1px solid black;
      box-shadow: 3px 3px 5px gray;
      border-radius: 5px;
      text-align: center;
      line-height: 1.75;
  }
  </code></pre>
  
  <p>But how do I add a click event to this button? I tried instead using a hyperlink control like this:</p>
  
  <pre><code>&lt;asp:HyperLink ID="hyp1" runat="server"&gt;&lt;div id="loginBtn"&gt;Login&lt;/div&gt;&lt;/asp:HyperLink&gt;
  </code></pre>
  
  <p>But I couldnt find a way to add a click event to a hyperlink.</p>
  
  <p>Anyone have any ideas?</p>