This documentation is archived and is not being maintained.

ImageField::ReadOnly Property

Gets or sets a value indicating whether the values of the field specified by the DataImageUrlField property can be modified in edit mode.

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

public:
virtual property bool ReadOnly {
	bool get ();
	void set (bool value);
}

Property Value

Type: System::Boolean
true to indicate that the field values cannot be modified in edit mode; otherwise, false. The default is false.

By default, the values of the field specified by the DataImageUrlField property can be modified by the user when a data-bound control is in edit mode. To prevent the user from changing the values of the field, set this property to true.

NoteNote

In an ImageField object, the DataImageUrlField property usually contains the name of the field that contains the URLs to the images displayed in the object.

The following example demonstrates how to use the ReadOnly property to indicate that the field values that represent the URLs to the images displayed in an ImageField object cannot be modified in edit mode.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: