ValidatorCollection.Count Property

 

Gets the number of references in the collection.

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

Public ReadOnly Property Count As Integer

Property Value

Type: System.Int32

The number of validation controls in the page's ValidatorCollection.

The following code example demonstrates using the Count property.

' 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

.NET Framework
Available since 1.1
Return to top
Show: