PolygonHotSpot Class
Defines a polygon-shaped hot spot region in an ImageMap control. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
The PolygonHotSpot type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | AccessKey | Gets or sets the access key that allows you to quickly navigate to the HotSpot region. (Inherited from HotSpot.) |
![]() | AlternateText | 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. (Inherited from HotSpot.) |
![]() | Coordinates | A string of coordinates that represents the vertexes of a PolygonHotSpot object. |
![]() | HotSpotMode | Gets or sets the behavior of a HotSpot object in an ImageMap control when the HotSpot is clicked. (Inherited from HotSpot.) |
![]() | IsTrackingViewState | Gets a value indicating whether the HotSpot object is tracking its view-state changes. (Inherited from HotSpot.) |
![]() | MarkupName | When overridden in a derived class, gets the string representation for the HotSpot object's shape. (Inherited from HotSpot.) |
![]() | NavigateUrl | Gets or sets the URL to navigate to when a HotSpot object is clicked. (Inherited from HotSpot.) |
![]() | PostBackValue | Gets or sets the name of the HotSpot object to pass in the event data when the HotSpot is clicked. (Inherited from HotSpot.) |
![]() | TabIndex | Gets or sets the tab index of the HotSpot region. (Inherited from HotSpot.) |
![]() | Target | Gets or sets the target window or frame in which to display the Web page content linked to when a HotSpot object that navigates to a URL is clicked. (Inherited from HotSpot.) |
![]() | ViewState | Gets a dictionary of state information that allows you to save and restore the view state of a HotSpot object across multiple requests for the same page. (Inherited from HotSpot.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetCoordinates | Returns a string that represents the coordinates of the vertexes of a PolygonHotSpot object. (Overrides HotSpot::GetCoordinates().) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | LoadViewState | Restores the HotSpot object's previously saved view state to the object. (Inherited from HotSpot.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | SaveViewState | Saves the changes to the HotSpot object's view state since the time the page was posted back to the server. (Inherited from HotSpot.) |
![]() | ToString | Returns the String representation of this instance of a HotSpot object. (Inherited from HotSpot.) |
![]() | TrackViewState | Causes the HotSpot object to track changes to its view state so they can be stored in the object's StateBag object. This object is accessible through the Control::ViewState property. (Inherited from HotSpot.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IStateManager::IsTrackingViewState | Infrastructure. Gets a value indicating whether the HotSpot object is tracking its view-state changes. (Inherited from HotSpot.) |
![]() ![]() | IStateManager::LoadViewState | Infrastructure. Restores the HotSpot object's previously saved view state to the object. (Inherited from HotSpot.) |
![]() ![]() | IStateManager::SaveViewState | Infrastructure. Saves the changes to the HotSpot object's view state since the last time the page was posted back to the server. (Inherited from HotSpot.) |
![]() ![]() | IStateManager::TrackViewState | Infrastructure. Instructs the HotSpot region to track changes to its view state. (Inherited from HotSpot.) |
This class defines a polygon-shaped hot spot region in an ImageMap control. The PolygonHotSpot is useful for defining irregularly shaped hot spot regions in an ImageMap control. For example, you can use it to define individual regions within a geographical map.
To define the region of a PolygonHotSpot, set the Coordinates property to a string that specifies the coordinates of each vertex of the PolygonHotSpot object. A polygon vertex is a point at which two polygon edges meet.
When a PolygonHotSpot object is clicked, the page navigates to a URL, generates a post back to the server, or does nothing. The HotSpotMode property specifies this behavior. To navigate to a URL, set the HotSpotMode property to HotSpotMode.Navigate, and use the NavigateUrl property to specify the URL to navigate to. To post back to the server, set the HotSpotMode property to HotSpotMode.PostBack, and use the PostBackValue property to specify a name for the PolygonHotSpot object. This name will be passed in the ImageMapEventArgs event data when the PolygonHotSpot is clicked. If you want the PolygonHotSpot object to have no behavior, set the HotSpotMode property to HotSpotMode.Inactive.
| Topic | Location |
|---|---|
| How to: Add ImageMap Web Server Controls to a Web Forms Page | Building ASP .NET Web Applications |
| How to: Add ImageMap Web Server Controls to a Web Forms Page | Building ASP .NET Web Applications |
The following code example demonstrates how to create an ImageMap control that contains three PolygonHotSpot objects. Each PolygonHotSpot object represents a geographical region on the map. When the user clicks a PolygonHotSpot object, it posts back to the server and the type and name of the hot spot are displayed in a label.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.






