title: Update Database On Button Press Not CheckBox Check
body: <p>I seem to be stuck with tunnel vision only seeing how to update a database based off the check/uncheck event of a checkbox.  What I am wanting to do is hold the event from firing until a button is pressed.  How could I achieve such?</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;td valign="top" style="text-align: left; width: 200px;"&gt;
  &lt;asp:GridView runat="server" ID="datagridTest" AutoGenerateColumns="false" GridLines="Both" &gt;
      &lt;Columns&gt;
      &lt;asp:BoundField DataField="thirteen" HeaderText="You" /&gt;
      &lt;asp:BoundField DataField="seven" HeaderText="Me" /&gt;
      &lt;asp:TemplateField&gt;
          &lt;ItemTemplate&gt;
              &lt;asp:Label runat="server" Text='&lt;%#Eval("josemen1212") %&gt;' ID="red" Visible="false"&gt;&lt;/asp:Label&gt;
           &lt;/ItemTemplate&gt;
          &lt;ItemTemplate&gt;
              &lt;asp:CheckBox ID="checker" runat="server" AutoPostBack="true" OnCheckedChanged="Checker_Click" Checked='&lt;%# Convert.ToBoolean(Eval("green")) %&gt;' /&gt;
          &lt;/ItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  &lt;/br&gt;
  &lt;asp:Button runat="server" ID="btnClickMe" CssClass="Buttons" Text="Click" OnClick="btnClickMe_Click" /&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p><strong>C#</strong></p>
  
  <pre><code>private void btnClickMe_Click(object sender, EventArgs e)
  {
    //Here is where I want the update to run
  }
  
  protected void Checker_Click(object sender, EventArgs e)
  {
  foreach (GridViewRow row in dgRD.Rows)
  {
      if (row.RowType == DataControlRowType.DataRow)
      {
          CheckBox chk = (CheckBox)row.FindControl("checker");
          if (chk.Checked)
          {
              string ID = ((Label)row.FindControl("josemen1212")).Text;
              //Run Sql statement to update db
          }
          else
          {
              string ID = ((Label)row.FindControl("josemen1212")).Text;
              //Run sql statement to update db
          }
      }
  }
  }
  </code></pre>