M
msnews.microsoft.com
I've got a paging and sorting enabled GridView whose datasource is and
AccessDataSource. I build the SelectCommand at PageLoad - it's a union
query to show items and comments of the user logged in. This all works
fine.
I tried to set AccessDataSource.UpdateCommand in the code behind (C#) by
handling the GridView.OnUpdating event - since this is supposed to fire
before the record is updated, I thought I could set the UpdateCommand here.
Didn't work.
So I tried setting the UpdateCommand in design, adding it as an element in
the .aspx, with asp:ControlParameters inside UpdateParameters. This didn't
work either.
Both ways that didn't work didn't kick me back to Visual Studio in debug
mode - instead I get (I think the same msg for both approaches) the message
below. How do I go about troubleshooting this?
Invalid postback or callback argument.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.ArgumentException: Invalid postback or callback
argument.
[ArgumentException: Invalid postback or callback argument.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String
argument) +2089124
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String
eventArgument) +101
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5191
AccessDataSource. I build the SelectCommand at PageLoad - it's a union
query to show items and comments of the user logged in. This all works
fine.
I tried to set AccessDataSource.UpdateCommand in the code behind (C#) by
handling the GridView.OnUpdating event - since this is supposed to fire
before the record is updated, I thought I could set the UpdateCommand here.
Didn't work.
So I tried setting the UpdateCommand in design, adding it as an element in
the .aspx, with asp:ControlParameters inside UpdateParameters. This didn't
work either.
Both ways that didn't work didn't kick me back to Visual Studio in debug
mode - instead I get (I think the same msg for both approaches) the message
below. How do I go about troubleshooting this?
Invalid postback or callback argument.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.ArgumentException: Invalid postback or callback
argument.
[ArgumentException: Invalid postback or callback argument.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String
argument) +2089124
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String
eventArgument) +101
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5191