This documentation is archived and is not being maintained.

Page.Validators Property

Gets a collection of all validation controls contained on the requested page.

[Visual Basic]
Public ReadOnly Property Validators As ValidatorCollection
[C#]
public ValidatorCollection Validators {get;}
[C++]
public: __property ValidatorCollection* get_Validators();
[JScript]
public function get Validators() : ValidatorCollection;

Property Value

The collection of validation controls.

Remarks

You can use this property to manipulate the methods and properties of ValidatorCollection object associated with the current Page instance. This collection contains all of the validation server controls that are contained in a page.

Calling the Page.Validate method causes validation logic to be executed for each validation server control contained in this collection. If any of these controls to not pass, the Page.IsValid property returns false.

Example

For an example of using this property, see Base Validator Control Sample.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

Page Class | Page Members | System.Web.UI Namespace | ValidatorCollection

Show: