ValidatorCollection.Add Method (IValidator)

 

Adds the specified validation server control to the ValidatorCollection collection.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

member Add : 
        validator:IValidator -> unit

Parameters

validator
Type: System.Web.UI.IValidator

The validation server control to add.

When added to the ValidatorCollection collection of a Page object through the Validators property, the IValidator implementation takes part in validation. Its Validate method is called together with the Validate methods of all other validators. All validators then share in determining whether the Page object as a whole is valid.

The following code example demonstrates how to use the Add method.

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

.NET Framework
Available since 1.1
Return to top
Show: