Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
Invalid postback or callback argument.
posted

Hi.

I have a WebDataGrid with paging and sorting. The data is binded in the OnLoad event. EnableEventValidation for the page and the grid EnableViewState attribute are both true. If I load the page and then press the submit button it works fine. But If I navigate to another page in the grid and then press the submit button I get this error:

ArgumentException: 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.] System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +10973200 System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +72 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +507 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint

 

The error is in the DropDownList.LoadPostData but it must be related t the WebDataGrid as it only occurs when I change the page or sort some column.

Any ideas on how to fix this.

Thanks a lot.