I am attempting to add a delete command to my data grid, and it worked fine on my previous program, but now for some reason is giving me this error message:
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.
The data grid is in this format:
<asp:DataGrid id=dg runat="server" ondeletecommand="Delete_Item">
commandname="Delete" text="Remove All" />
and the "Delete_Item" subroutine is here:
Sub Delete_Item(s As Object, e As DataGridCommandEventArgs)
objDT = Session("Cart")
Session("Cart") = objDT
dg.DataSource = objDT
So this used to remove a row from my data grid, but not anymore.
It would be super if someone could tell me what the problem is.