GridView/AccessDataSource update

  • Thread starter msnews.microsoft.com
  • Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top