ImageField.DataAlternateTextField Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the name of the field from the data source that contains the values to bind to the AlternateText property of each image in an ImageField object.

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

public:
virtual property String^ DataAlternateTextField {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_DataAlternateTextField ()

/** @property */
public void set_DataAlternateTextField (String value)

public function get DataAlternateTextField () : String

public function set DataAlternateTextField (value : String)

Property Value

The name of the field to bind the AlternateText property of each image in an ImageField object.

Use the DataAlternateTextField property to specify the name of the filed from the data source that contains the values to bind to the AlternateText property of each image in an ImageField object. The enables you to have different alternate text for each image displayed. The alternate text is displayed when an image cannot be loaded or is unavailable. Browsers that support the ToolTips feature also display this text as a ToolTip.

NoteNote

You can specify alternate text that applies to all images by setting the AlternateText property instead of this property. If both the AlternateText and DataAlternateTextField properties are set, the DataAlternateTextField field takes precedence.

The following example code demonstrates how to use the DataAlternateTextField property to specify the name of the field from the data source that contains the values to bind to the AlternateText property of each image in an ImageField object.

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

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

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: