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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: