ASP.Net Error: Invalid postback or callback argument

Last Reply 11 months ago By pandeyism

Posted 11 months ago

i am facing error when i am deleting row from gridview session.

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> 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.

here is my row delete event...

int index = Convert.ToInt32(e.RowIndex);
DataTable dt = (DataTable)ViewState["buyitems"];
ViewState["dt"] = dt;
GridView1.DataSource = dt;

please guide.

Posted 11 months ago