title: Update Gridview with Image Button
body: <p>I have 2 image buttons, Accept and Reject. 
  Accept button will update [status] to 1
  Reject button will update [status] to 2</p>
  
  <p>I had successfully use UpdateCommand to update Accept button</p>
  
  <pre><code>UpdateCommand="UPDATE [bookingschedule] SET status='1'WHERE [bookingScheduleID] = @bookingScheduleID"
  </code></pre>
  
  <p>But, I do not know how to set update command for Reject button since I can declared UpdateCommand once only.</p>
  
  <pre><code>UpdateCommand2="UPDATE [bookingschedule] SET status='2'WHERE [bookingScheduleID] = @bookingScheduleID" (incorrect)
  </code></pre>
  
  <p>What should I do to make Reject button function? Where should i put this 2nd update command line:</p>
  
  <pre><code>UpdateCommand="UPDATE [bookingschedule] SET status='2'WHERE [bookingScheduleID] = @bookingScheduleID"
  </code></pre>
  
  <p>I do all this coding at client side:</p>
  
  <p><strong>Accept Button:</strong></p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Action Approve"&gt;
  &lt;ItemTemplate&gt;
  &lt;asp:ImageButton runat="server" ID="UpdateCommand"
    CommandName="update" ImageUrl="~/images/accept.png"
    OnClientClick="if (!window.confirm('Are you sure you want to approve this booking?')) return false;" /&gt;
  &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p><strong>Reject Button:</strong></p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Action Reject"&gt;
  &lt;ItemTemplate&gt;
  &lt;asp:ImageButton runat="server" ID="UpdateCommand" CommandName="update" OnClick="reject"
    ImageUrl="~/images/reject.png"
    OnClientClick="if (!window.confirm('Are you sure you want to reject this booking?')) return false;" /&gt;
  &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p><strong>SQL datasource:</strong></p>
  
  <pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&lt;%$ ConnectionStrings:ConnectionString1 %&gt;"
              SelectCommand="SELECT [bookingScheduleID], [eventTitle], [week1], [week2], [week3], [week4], [week5], [week6], [week7], [week8], [exhibitorname], [boothAlias], [category], [status], [dateBook],[custNo] FROM [booking_all]" 
              UpdateCommand="UPDATE [bookingschedule] SET status='1'WHERE [bookingScheduleID] = @bookingScheduleID"
              &gt;
          &lt;/asp:SqlDataSource&gt;
          &lt;UpdateParameters&gt;
          &lt;asp:Parameter Name="bookingScheduleID" Type="Int32" /&gt;
          &lt;/UpdateParameters&gt; 
  </code></pre>