title: Calling button click from asp.net codebehind
body: <p>I have two button as shown below:</p>
  
  <p><strong>1st Button:</strong></p>
  
  <pre><code>&lt;asp:Button ID="btn1" runat="server" Text="First Button" CausesValidation="False"
       UseSubmitBehavior="False" /&gt;
  </code></pre>
  
  <p><strong>2nd Button:</strong></p>
  
  <pre><code> &lt;button type="reset" id="btn2" runat="server"&gt;
          &lt;span&gt;Second Button&lt;/span&gt;
   &lt;/button&gt;
  </code></pre>
  
  <p>Now If I click <code>btn1</code> I need to do some stuff and then I need to click <code>btn2</code> <code>automatically</code> at the end of the process which needs to perform some client side operations.</p>
  
  <p>This is what I need to do:</p>
  
  <pre><code>Protected Sub btn1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn1.Click
  //Do some Stuff
  
  //Here I need to make btn2 click automatically
  End Sub
  </code></pre>
  
  <p>As my <code>btn2</code> should do this:</p>
  
  <pre><code>$("#&lt;%=btn2.ClientID%&gt;").click(function () {
  //perform some taks
  }
  </code></pre>