This documentation is archived and is not being maintained.

HotSpot::AlternateText Property

Gets or sets the alternate text to display for a HotSpot object in an ImageMap control when the image is unavailable or renders to a browser that does not support images.

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

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

Property Value

Type: System::String
The text displayed in place of the HotSpot when the ImageMap control's image is unavailable. The default value is an empty string ("").

Use the AlternateText property to specify the text to display for a HotSpot object in an ImageMap control when the image specified by the ImageUrl property is unavailable.

When an ImageMap control is rendered to a browser that does not support images, instead of displaying an image, it renders a hyperlink for each HotSpot in the ImageMap control. The control retrieves the text to display for each hyperlink from the AlternateText property for each HotSpot. When a user clicks one of the hyperlinks, it behaves like a HotSpot by either navigating to a specified URL, generating a postback to the server, or doing nothing.

When the ImageMap control renders to a browser that supports the ToolTips feature, the value of the AlternateText property is displayed as a ToolTip for the HotSpot.

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.

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: