Gridview with row being edited causing error when form submitted

Posted by Chris Phelps on Stack Overflow See other posts from Stack Overflow or by Chris Phelps
Published on 2010-04-07T14:28:43Z Indexed on 2010/04/07 14:33 UTC
Read the original article Hit count: 226

Filed under:

Using ASP.NET VB, I have a form with some text boxes and a Gridview. If a user clicks the Edit button on a row in the gridview, and then tries to submit the form with a row still in edit mode on the Gridview, this error is generated -

"Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. "

Any idea how to prevent this error??

© Stack Overflow or respective owner

Related posts about ASP.NET