title: Calling a C# method on a input type submit button
body: <p>I am having some trouble figuring out how to call a method I wrote in the .CS file that will update the user password in the database. </p>
  
  <p>Here is my current form:</p>
  
  <pre><code> &lt;form method="post" action="#" runat="server" name="edit_password_form"&gt;
      &lt;div id="edit_password_popup"&gt;
          &lt;table width="390" align="center" padding="10"&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;span class="error_field"&gt;*&lt;/span&gt;Password:&lt;br&gt;
                      &lt;input type="password" name="password_1" id="password_1" size="19" maxlength="30" autocapitalize="off" autocorrect="off" autocomplete="off"&gt;
                  &lt;/td&gt;
                  &lt;td&gt;&lt;span class="error_field"&gt;*&lt;/span&gt;Confirm Password:&lt;br&gt;
                      &lt;input type="password" name="password_2" id="password_2" size="19" maxlength="30" autocapitalize="off" autocorrect="off" autocomplete="off"&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
  
               &lt;tr&gt;
                  &lt;td&gt;&lt;input type="submit" value="Add Password" id="add_pass" alt="Add Password" border="0"&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;input type="button" value="No Thanks" id="no_thanks" alt="No Thanks" border="0"&gt;&lt;/td&gt;
               &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Should I maybe have the c# method in the .aspx file instead of the .aspx.cs?</p>
  
  <p>I want the C# method to run when the add_pass button is clicked. Any ideas on how I can achieve that?</p>