ValidatorCollection Class
Exposes an array of IValidator references. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
Each ValidatorCollection reference is associated with a validation server control contained on the requested page. These controls add themselves to this collection when the Init event of the Page object is handled. They remove themselves when the Unload event of the Page object is handled. The Page class inherits both of these methods from the Control class.
You can access this collection, its methods, and its properties through the Page.Validators property. If the tested condition of any validator in this collection fails, the Page.IsValid property is set to false.
The following code example demonstrates how to access the collection through the Page.Validators property and use the GetEnumerator method to iterate through the values.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.