ValidatorCollection.Item Property (Int32)
.NET Framework (current version)
Gets the validation server control at the specified index location in the ValidatorCollection collection.
Assembly: System.Web (in System.Web.dll)
Parameters
- index
-
Type:
System.Int32
The index of the validator to return.
The following code example demonstrates using the Item property.
// Get 'Validators' of the page to myCollection. ValidatorCollection myCollection = Page.Validators; // Print the values of Collection using 'Item' property. string myStr = " "; for(int i = 0; i<myCollection.Count; i++) { myStr += myCollection[i].ToString(); myStr += " "; } msgLabel.Text = myStr;
.NET Framework
Available since 1.1
Available since 1.1
Show: