Monday, October 18, 2010

Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEve

"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."

in my case it is caused by trying to call a radgrid.rebind() in page_load, the radgrid sits inside of a radupdatepanel. In case of postback the code contains client script which caused this security breach. After I put radgrid.rebind() inside !IsPostBack the error disappearred.