Redigeeri

Jagamisviis:


HotSpot.AlternateText Property

Definition

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.

public:
 virtual property System::String ^ AlternateText { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
public virtual string AlternateText { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.AlternateText : string with get, set
Public Overridable Property AlternateText As String

Property Value

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

Attributes

Remarks

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 Globalization and Localization.

Applies to

See also