Updated: October 2009
Gets or sets a value indicating whether the page validates postback and callback events.
Namespace:
System.Web.UI
Assembly:
System.Web (in System.Web.dll)
Visual Basic (Declaration)
<BrowsableAttribute(False)> _
Public Overridable Property EnableEventValidation As Boolean
Dim instance As Page
Dim value As Boolean
value = instance.EnableEventValidation
instance.EnableEventValidation = value
[BrowsableAttribute(false)]
public virtual bool EnableEventValidation { get; set; }
[BrowsableAttribute(false)]
public:
virtual property bool EnableEventValidation {
bool get ();
void set (bool value);
}
public function get EnableEventValidation () : boolean
public function set EnableEventValidation (value : boolean)
<asp:Page EnableEventValidation="True|False" />
Property Value
Type:
System..::.Boolean
true if the page validates events; otherwise, false.The default is true.
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 events that can be raised by the control during a postback request or callback.
Note: |
|---|
This event validation mechanism reduces the risk of unauthorized postback requests and callbacks. With this model, a control registers its events during rendering and then validates the events during the post-back or callback handling. All event-driven controls in ASP.NET use this feature by default. |
It is strongly recommended that you do not disable event validation. If you do disable event validation, make sure that no postback could be constructed that could have an unintended effect on your application.
You set the EnableEventValidation property by setting the enabledEventValidation attribute of the @ Page directive or the enableEventValidation attribute of the pages element in the Web.config file. You cannot set the EnableEventValidation property in code.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0
Reference
Other Resources
Date | History | Reason |
|---|
October 2009
| Corrected text that indicated the property could be set in code. |
Content bug fix.
|