This documentation is archived and is not being maintained.

HotSpot Class

Implements the basic functionality common to all hot spot shapes.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HotSpot : IStateManager

You cannot directly create instances of the abstract HotSpot class. Instead, this class is inherited by the CircleHotSpot, RectangleHotSpot, and PolygonHotSpot classes to provide the common basic functionality for a hot spot. You must derive from the HotSpot class to create a custom hot spot class that represents a unique shape that you define. However, you can define most shapes using the CircleHotSpot, RectangleHotSpot, and PolygonHotSpot classes.

When a HotSpot in an ImageMap control is clicked, the page either navigates to a URL, generates a postback to the server, or does nothing. The HotSpotMode property specifies this behavior. To navigate to a URL, set the HotSpotMode property to HotSpotMode.Navigate. Use the NavigateUrl property to specify the URL to navigate to. To post back to the server, set the HotSpotMode property to HotSpotMode.PostBack. Use the PostBackValue property to specify a name for the HotSpot object. This name will be passed in the ImageMapEventArgs event data when the HotSpot object is clicked. If you want the HotSpot object to have no behavior set the HotSpotMode property to HotSpotMode.Inactive.

Alternately, you can use the HotSpotMode property on the containing ImageMap control to specify a HotSpot object's behavior. For more information, see HotSpotMode.

Notes to Inheritors:

When you inherit from HotSpot, you must override the following members: GetCoordinates and MarkupName.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0