Assembly: System.Web (in system.web.dll)
/** @property */ public boolean get_EnableEventValidation () /** @property */ public void set_EnableEventValidation (boolean value)
public function get EnableEventValidation () : boolean public function set EnableEventValidation (value : boolean)
Property Valuetrue if the page validates events; otherwise, false.The default is true.
The EnableEventValidation property was set after the page was initialized.
The event validation mechanism reduces the risk of unauthorized postback requests and callbacks. When the EnableEventValidation property is set to true, ASP.NET allows only the specific events that can be raised on the control during a postback request or callback. In this model, a control registers its events during rendering and then validates the events during postback or callback handling. All event-driven controls in ASP.NET now use this feature by default.
It is strongly recommended that you do not disable event validation. Before disabling event validation, you should be sure that no postback could be constructed that would have an unintended effect on your application.
In most circumstances, set the EnableEventValidation property by setting the enabledEventValidation attribute of the @ Page directive or the enableEventValidation attribute of the pages element of the Web.config file. If you set the EnableEventValidation property in code, set it in the Page_Init phase of page processing.