Image::AlternateText Property

 

Gets or sets the alternate text displayed in the Image control when the image is unavailable. Browsers that support the ToolTips feature display this text as a ToolTip.

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

public:
[BindableAttribute(true)]
property String^ AlternateText {
	virtual String^ get();
	virtual void set(String^ value);
}

Property Value

Type: System::String^

The alternate text displayed in the Image control when the image is unavailable.

Use this property to specify the text to display if the image specified in the ImageUrl property is not available. In browsers that support the ToolTips feature, this text also displays as a ToolTip.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

The following example demonstrates how to use the AlternateText property to specify the alternate text to display for the image when the image is not available.

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

.NET Framework
Available since 1.1
Return to top
Show: