title: Debugging GridView / ObjectDataSource events
body: <p>Ahoy!</p>
  
  <p>I am using an ASP.NET GridView control bound to an ObjectDataSource:</p>
  
  <pre><code>&lt;asp:ObjectDataSource ID="Things" runat="server"
      TypeName="BLL.Thing"
      UpdateMethod="UpdateThing"
      OnUpdating="Things_Updating"
      OnUpdated="Things_Updated"&gt;
      &lt;UpdateParameters&gt;
          &lt;asp:SessionParameter
              Name="userContext"
              SessionField="UserContext"
              Type="Object" /&gt;
          &lt;asp:Parameter Name="thing" Type="Object" /&gt;
      &lt;/UpdateParameters&gt;
  &lt;/asp:ObjectDataSource&gt;
  </code></pre>
  
  <p>Clicking on an ImageButton control with CommandName="Update" causes the specified OnUpdating event to occur, but not the specified UpdateMethod or the OnUpdated event.</p>
  
  <pre><code>&lt;EditItemTemplate&gt;
      &lt;asp:ImageButton ID="ImageButton_Save" runat="server"
          CommandName="Update"
          SkinID="Save"
          CausesValidation="false"
          CommandArgument='&lt;%# Eval("Id") %&gt;' /&gt;
      &lt;asp:ImageButton ID="ImageButton_Cancel" runat="server"
          CommandName="Cancel"
          SkinID="Cancel"
          CausesValidation="false" /&gt;
  &lt;/EditItemTemplate&gt;
  </code></pre>
  
  <p>The input parameters are defined in the OnUpdating event like so:</p>
  
  <pre><code>protected void Things_Updating(object sender, ObjectDataSourceMethodEventArgs e)
  {
      e.InputParameters["thing"] = _theThing;
  }
  </code></pre>
  
  <p>No exception is thrown. The page just posts back with the EditItemTemplate controls still showing. I can put breakpoints all over the place, but the trail stops at the end of Things_Updating. It seems that some exception is happening which is not handled or caught by the debugger. Is there a way to open the hood and see what ASP.NET is doing (or failing to do)?</p>
  
  <p>Thanks in advance!</p>