Gets or sets the behavior of a System.Web.UI.WebControls.HotSpot object in an System.Web.UI.WebControls.ImageMap control when the System.Web.UI.WebControls.HotSpot is clicked.
Documentation for this section has not yet been entered.
Use the HotSpot.HotSpotMode property to specify the behavior of a System.Web.UI.WebControls.HotSpot object in an System.Web.UI.WebControls.ImageMap control when the System.Web.UI.WebControls.HotSpot is clicked. This property is set using one of the System.Web.UI.WebControls.HotSpotMode enumeration values. The following table lists the possible values.
NotSet |
The System.Web.UI.WebControls.HotSpot uses the behavior set by the System.Web.UI.WebControls.ImageMap control's ImageMap.HotSpotMode property. If the System.Web.UI.WebControls.ImageMap control does not define the behavior, the System.Web.UI.WebControls.HotSpot objects navigate to a URL. |
Inactive |
The System.Web.UI.WebControls.HotSpot does not have any behavior. |
Navigate |
The System.Web.UI.WebControls.HotSpot navigates to a URL. |
PostBack |
The System.Web.UI.WebControls.HotSpot generates a postback to the server. |
You can specify System.Web.UI.WebControls.HotSpot behavior on either the ImageMap.HotSpotMode property of the control or on the HotSpot.HotSpotMode property of each individual System.Web.UI.WebControls.HotSpot object. If both properties are set, the HotSpot.HotSpotMode property specified on each individual System.Web.UI.WebControls.HotSpot object takes precedence over the ImageMap.HotSpotMode property on the System.Web.UI.WebControls.ImageMap control.
If you specify HotSpotMode.NotSet for the HotSpot.HotSpotMode property of an individual System.Web.UI.WebControls.HotSpot object, the System.Web.UI.WebControls.HotSpot gets its behavior from the containing System.Web.UI.WebControls.ImageMap control's ImageMap.HotSpotMode property. In this scenario, if the System.Web.UI.WebControls.ImageMap control's ImageMap.HotSpotMode property is either not set to a value or is set to HotSpotMode.NotSet, the default behavior is to navigate to a URL.
If you specify HotSpotMode.Navigate for the HotSpot.HotSpotMode property of a System.Web.UI.WebControls.HotSpot object, the System.Web.UI.WebControls.HotSpot object navigates to a URL when the hot spot region is clicked. Use the HotSpot.NavigateUrl property to specify the URL to navigate to.
If you specify HotSpotMode.PostBack for the HotSpot.HotSpotMode property of a System.Web.UI.WebControls.HotSpot object, the System.Web.UI.WebControls.HotSpot object generates a post back to the server when the System.Web.UI.WebControls.HotSpot is clicked. Use the HotSpot.PostBackValue property to specify a name for the System.Web.UI.WebControls.HotSpot. This name will be passed in the System.Web.UI.WebControls.ImageMapEventArgs event data on when a postback event occurs. When a postback System.Web.UI.WebControls.HotSpot is clicked, the ImageMap.Click event is raised. To programmatically control the actions performed when a postback System.Web.UI.WebControls.HotSpot is clicked, provide an event handler for the ImageMap.Click event.
To cause all System.Web.UI.WebControls.HotSpot objects in an System.Web.UI.WebControls.ImageMap control to have the same behavior, set the HotSpot.HotSpotMode property on each individual System.Web.UI.WebControls.HotSpot object to HotSpotMode.NotSet or do not specify a value for the HotSpot.HotSpotMode property.
To specify different behaviors for System.Web.UI.WebControls.HotSpot objects in an System.Web.UI.WebControls.ImageMap control, set the HotSpot.HotSpotMode property on each individual System.Web.UI.WebControls.HotSpot object to either HotSpotMode.Navigate, HotSpotMode.PostBack, or HotSpotMode.Inactive.
If an System.Web.UI.WebControls.ImageMap control's ImageMap.HotSpotMode property or the HotSpot.HotSpotMode property on the System.Web.UI.WebControls.HotSpot objects it contains is either not set to a value or set to HotSpotMode.NotSet, by default the behavior is HotSpotMode.Navigate.
If you specify HotSpotMode.Inactive for the HotSpot.HotSpotMode property, the System.Web.UI.WebControls.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 System.Web.UI.WebControls.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 System.Web.UI.WebControls.ImageMap control. For example, the following System.Web.UI.WebControls.ImageMap defines an active ring by specifying an inactive circular hot spot within a larger active circular hot spot:
Example
<asp:ImageMap ID="SaturnImage" ImageUrl="~/saturn.PNG" runat="server" OnClick="SaturnImage_Click"> <asp:CircleHotSpot AlternateText="planet" HotSpotMode=PostBack PostBackValue="planet" Radius=40 X=100 Y=100 /> <asp:CircleHotSpot HotSpotMode=Inactive Radius=60 X=100 Y=100 /> <asp:CircleHotSpot AlternateText="rings" HotSpotMode=PostBack PostBackValue="rings" Radius=80 X=100 Y=100 /> </asp:ImageMap>