MobilePage.EnableEventValidation Property
Assembly: System.Web.Mobile (in system.web.mobile.dll)
public: virtual property bool EnableEventValidation { bool get () override; void set (bool value) override; }
/** @property */ public boolean get_EnableEventValidation () /** @property */ public void set_EnableEventValidation (boolean value)
public override function get EnableEventValidation () : boolean public override function set EnableEventValidation (value : boolean)
Property Value
true to validate post-back event data; otherwise, false.ASP.NET controls create client-side script to raise post-back events on the server. Because a malicious user could use the postback script to send arbitrary post events to server controls, ASP.NET 2.0 controls validate the event data to ensure the event was raised by client-side code rendered by the control.
Setting the EnableEventValidation property to false returns the control behavior to the same as ASP.NET 1.0.
You can set the EnableEventValidation property for a Web application by setting the enableEventValidation attribute of the pages Element (ASP.NET Settings Schema) in the application's Web.config file, or for a single page by setting the EnableEventValidation attribute of the @ Page directive.
The following code example uses the pages configuration element to set the EnableEventValidation property to false in an application's Web.config file.
<configuration>
<system.web>
<pages enableEventValidation="false" />
</system.web>
</configuration>
The following code example uses the EnableEventValidation attribute of the @ Page directive to set the EnableEventValidation property for a single page in an application.
<%@Page EnableEventValidation="false" ... %>
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.