Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 2.0
PagesSection Class
 EnableEventValidation Property

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
PagesSection.EnableEventValidation Property
Gets or sets a value enabling event validation.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)
Visual Basic (Declaration)
Public Property EnableEventValidation As Boolean
Visual Basic (Usage)
Dim instance As PagesSection
Dim value As Boolean

value = instance.EnableEventValidation

instance.EnableEventValidation = value
C#
public bool EnableEventValidation { get; set; }
C++
public:
property bool EnableEventValidation {
    bool get ();
    void set (bool value);
}
J#
/** @property */
public boolean get_EnableEventValidation ()

/** @property */
public void set_EnableEventValidation (boolean value)
JScript
public function get EnableEventValidation () : boolean

public function set EnableEventValidation (value : boolean)
XAML
Not applicable.

Property Value

true if event validation is enabled; otherwise, false.

The default value is true. A Web application can optionally disable event validation to revert to .NET Framework version 1.0 behavior.

The EnableEventValidation attribute indicates whether event validation should be performed.

The base control checks this attribute to determine whether it should validate events. A derived control does not inherit this base control attribute, and so it is exempt from event validation by default.

The user can still instruct ASP.NET to perform event validation on the derived control by adding the EnableEventValidation attribute to the derived control itself and setting it to true.

NoteNote:

This event validation mechanism eliminates the risk of unauthorized postback requests and callbacks. It instructs ASP.NET to validate only those specific events that can be raised on the control during a postback request or callback. 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 now use this feature by default.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker