Invalid postback or callback argument

added by sapnep
8/6/2011 11:19:24 AM

401 Views

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.


1 comments

vijayst
8/6/2011 11:18:27 AM
Usually, event validations fail when developers write buggy code. The most common mistake occurs for dynamic controls. The other scenario is a custom control that emits javascript incorrectly: A __doPostback without the control id.

Similar to event validation is request validation with which i get confused. Request validation fails when there is HTML within the postback data.