Ahoy!
I am using an ASP.NET GridView control bound to an ObjectDataSource:
<asp:ObjectDataSource ID="Things" runat="server"
TypeName="BLL.Thing"
UpdateMethod="UpdateThing"
OnUpdating="Things_Updating"
OnUpdated="Things_Updated">
<UpdateParameters>
<asp:SessionParameter
Name="userContext"
SessionField="UserContext"
Type="Object" />
<asp:Parameter Name="thing" Type="Object" />
</UpdateParameters>
</asp:ObjectDataSource>
Clicking on an ImageButton control with CommandName="Update" causes the specified OnUpdating event to occur, but not the specified UpdateMethod or the OnUpdated event.
<EditItemTemplate>
<asp:ImageButton ID="ImageButton_Save" runat="server"
CommandName="Update"
SkinID="Save"
CausesValidation="false"
CommandArgument='<%# Eval("Id") %>' />
<asp:ImageButton ID="ImageButton_Cancel" runat="server"
CommandName="Cancel"
SkinID="Cancel"
CausesValidation="false" />
</EditItemTemplate>
The input parameters are defined in the OnUpdating event like so:
protected void Things_Updating(object sender, ObjectDataSourceMethodEventArgs e)
{
e.InputParameters["thing"] = _theThing;
}
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)?
Thanks in advance!