This documentation is archived and is not being maintained.

ValidatorCollection Constructor

Initializes a new instance of the ValidatorCollection class.

[Visual Basic]
Public Sub New()
public ValidatorCollection();
public: ValidatorCollection();
public function ValidatorCollection();


[Visual Basic, C#] The following example demonstrates using the ValidatorCollection constructor.

[Visual Basic] 
' Get 'Validators' of the page to myCollection.
Dim myCollection As ValidatorCollection = Page.Validators
' Show the number of validators of the page.
Dim count As Integer = myCollection.Count

// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection = Page.Validators;
// Show the number of validators of the page.
int count = myCollection.Count;

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button Language Filter in the upper-left corner of the page.


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

See Also

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