Export (0) Print
Expand All

ServerValidateEventArgs Class

Provides data for the ServerValidate event of the CustomValidator control. This class cannot be inherited.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public ref class ServerValidateEventArgs : public EventArgs
public class ServerValidateEventArgs extends EventArgs
public class ServerValidateEventArgs extends EventArgs
Not applicable.

A ServerValidateEventArgs is passed to the ServerValidate event handler to provide event data to the handler. The ServerValidate event is raised when validation is performed on the server. This allows you to perform a custom server-side validation routine on the value of an input control (with a CustomValidator control associated with it) in the event handler.

The value to validate is determined by using the Value property. Once your code has determined whether the value is valid, store the results of the validation in the IsValid property.

For a list of initial property values for an instance of ServerValidateEventArgs, see the ServerValidateEventArgs constructor.

For more information about handling events, see Consuming Events.

TopicLocation
Walkthrough: Validating User Input in a Web Forms PageBuilding ASP .NET Web Applications in Visual Studio

The following example demonstrates how to use a ServerValidateEventArgs to pass event data to a custom event handler for the ServerValidate event. Notice that the Value property of the ServerValidateEventArgs is used to determine the value to validate, while the IsValid property is used to store the results of the validation.

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.

System.Object
   System.EventArgs
    System.Web.UI.WebControls.ServerValidateEventArgs

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft