asp.net.ph

ImageMap.HotSpotMode Property

System.Web.UI.WebControls Namespace   ImageMap Class


.NET Framework version 2.0

Gets or sets the default behavior for the HotSpot objects of an ImageMap control when the HotSpot objects are clicked.

Syntax


Inline <asp:ImageMap hotspotmode = enumValue ... >
Script ImageMap.HotSpotMode [ = enumValue ]

Property Value


enumValue One of the HotSpotMode enumeration values.

The property is read/write with a default value of NotSet.

Remarks

Use the HotSpotMode property to specify the default click behavior of the HotSpot objects within an ImageMap control. This property is set using one of the HotSpotMode enumeration values. The following table lists the possible values.

Item Description
Inactive The HotSpot object does not have any behavior.
NotSet The HotSpot object uses the behavior set by the ImageMap control's HotSpotMode property. If the ImageMap control does not define the behavior, the HotSpot objects all navigate to a URL.
Navigate The HotSpot objects navigate to a URL.
PostBack The HotSpot objects generate a postback to the server.

You can specify a HotSpot object's behavior using either the ImageMap.HotSpotMode property of the ImageMap control or the HotSpot.HotSpotMode property of each individual HotSpot object. If both properties are set, the HotSpot.HotSpotMode property specified on each individual HotSpot object takes precedence over the ImageMap.HotSpotMode property on the ImageMap control.

When you set the HotSpotMode property of the ImageMap control, note that the HotSpotMode.NotSet and HotSpotMode.Navigate values have the same behavior: both navigate to a URL. When you specify HotSpotMode.NotSet for the HotSpot.HotSpotMode property of an individual HotSpot object, that HotSpot determines its behavior from the value of the HotSpotMode property of the ImageMap control.

If you specify HotSpotMode.Navigate for the ImageMap.HotSpotMode property, the page navigates to a URL when the HotSpot is clicked. Use the NavigateUrl property to specify the URL to navigate to.

If you specify HotSpotMode.PostBack for the ImageMap.HotSpotMode property, the page generates a postback to the server when the HotSpot is clicked. Use the PostBackValue property to specify the name of the hot spot region. This name will be passed in the ImageMapEventArgs event data when a postback event occurs. When a postback HotSpot is clicked, the Click event is raised. To programmatically control the actions performed when a postback HotSpot is clicked, provide an event handler for the Click event.

If you specify HotSpotMode.Inactive for the HotSpot.HotSpotMode property, the HotSpot object does not have any behavior when it is clicked. You can use this value to create an inactive hot spot within a larger active hot spot. This option is provided to allow you to create more complex hot spot zones within an ImageMap control.

To create an inactive area within an active hot spot, you must specify the inactive hot spot before the active hot spot in the ImageMap control. For example, the following ImageMap defines an active ring by specifying an inactive circular hot spot within a larger active circular hot spot:

See Also

HotSpot.HotSpotMode Property Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph