HotSpot.AlternateText Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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 string AlternateText { get; set; }

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.

.NET Framework
Available since 2.0
Return to top
Show: