Export (0) Print
Expand All

ValidatorCollection.IsReadOnly Property

Gets a value that indicates whether the ValidatorCollection collection is read-only.

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

public bool IsReadOnly { get; }
/** @property */
public boolean get_IsReadOnly ()

public function get IsReadOnly () : boolean

Not applicable.

Property Value

true if the collection is read-only; otherwise, false.

The following code example demonstrates using the IsReadOnly property.

// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection1 = Page.Validators;

// Get 'IsReadOnly' property of 'ValidatorCollection'.
bool readOnly_bool = myCollection1.IsReadOnly;

// Get 'IsSynchronized' property of 'ValidatorCollection'.
bool synchronized_bool = myCollection1.IsSynchronized;

// Get a synchronized object of the 'ValidatorCollection'.
ValidatorCollection myCollection2 = (ValidatorCollection)myCollection1.SyncRoot;
myCollection1.Add(myCollection1[0]);

// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection1 = get_Validators();
// Get 'IsReadOnly' property of 'ValidatorCollection'.
boolean readOnly_bool = myCollection1.get_IsReadOnly();
// Get 'IsSynchronized' property of 'ValidatorCollection'.
boolean synchronized_bool = myCollection1.get_IsSynchronized();
// Get a synchronized object of the 'ValidatorCollection'.
ValidatorCollection myCollection2 = (ValidatorCollection)(
    myCollection1.get_SyncRoot());
myCollection1.Add(myCollection1.get_Item(0));

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft