System.Web.UI.WebControls.PolygonHotSpot Class

Defines a polygon-shaped hot spot region in an System.Web.UI.WebControls.ImageMap control. This class cannot be inherited.

See Also: PolygonHotSpot Members

Syntax

public sealed class PolygonHotSpot : HotSpot

Remarks

This class defines a polygon-shaped hot spot region in an System.Web.UI.WebControls.ImageMap control. The System.Web.UI.WebControls.PolygonHotSpot is useful for defining irregularly shaped hot spot regions in an System.Web.UI.WebControls.ImageMap control. For example, you can use it to define individual regions within a geographical map.

To define the region of a System.Web.UI.WebControls.PolygonHotSpot, set the PolygonHotSpot.Coordinates property to a string that specifies the coordinates of each vertex of the System.Web.UI.WebControls.PolygonHotSpot object. A polygon vertex is a point at which two polygon edges meet.

When a System.Web.UI.WebControls.PolygonHotSpot object is clicked, the page navigates to a URL, generates a post back to the server, or does nothing. The HotSpot.HotSpotMode property specifies this behavior. To navigate to a URL, set the HotSpot.HotSpotMode property to HotSpotMode.Navigate, and use the HotSpot.NavigateUrl property to specify the URL to navigate to. To post back to the server, set the HotSpot.HotSpotMode property to HotSpotMode.PostBack, and use the HotSpot.PostBackValue property to specify a name for the System.Web.UI.WebControls.PolygonHotSpot object. This name will be passed in the System.Web.UI.WebControls.ImageMapEventArgs event data when the System.Web.UI.WebControls.PolygonHotSpot is clicked. If you want the System.Web.UI.WebControls.PolygonHotSpot object to have no behavior, set the HotSpot.HotSpotMode property to HotSpotMode.Inactive.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0