HotSpot Class (System.Web.UI.WebControls)

Switch View :
ScriptFree
.NET Framework Class Library
HotSpot Class

Implements the basic functionality common to all hot spot shapes.

Inheritance Hierarchy

System.Object
  System.Web.UI.WebControls.HotSpot
    System.Web.UI.WebControls.CircleHotSpot
    System.Web.UI.WebControls.PolygonHotSpot
    System.Web.UI.WebControls.RectangleHotSpot

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

Visual Basic
<TypeConverterAttribute(GetType(ExpandableObjectConverter))> _
Public MustInherit Class HotSpot _
	Implements IStateManager
C#
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
public abstract class HotSpot : IStateManager
Visual C++
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
public ref class HotSpot abstract : IStateManager
F#
[<AbstractClass>]
[<TypeConverterAttribute(typeof(ExpandableObjectConverter))>]
type HotSpot =  
    class
        interface IStateManager
    end

The HotSpot type exposes the following members.

Constructors

  Name Description
Protected method HotSpot Initializes a new instance of the HotSpot class.
Top
Properties

  Name Description
Public property AccessKey Gets or sets the access key that allows you to quickly navigate to the HotSpot region.
Public property 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.
Public property HotSpotMode Gets or sets the behavior of a HotSpot object in an ImageMap control when the HotSpot is clicked.
Protected property IsTrackingViewState Gets a value indicating whether the HotSpot object is tracking its view-state changes.
Protected property MarkupName When overridden in a derived class, gets the string representation for the HotSpot object's shape.
Public property NavigateUrl Gets or sets the URL to navigate to when a HotSpot object is clicked.
Public property PostBackValue Gets or sets the name of the HotSpot object to pass in the event data when the HotSpot is clicked.
Public property TabIndex Gets or sets the tab index of the HotSpot region.
Public property 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.
Protected property 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.
Top
Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetCoordinates When overridden in a derived class, returns a string that represents the coordinates of the HotSpot region.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method LoadViewState Restores the HotSpot object's previously saved view state to the object.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method SaveViewState Saves the changes to the HotSpot object's view state since the time the page was posted back to the server.
Public method ToString Returns the String representation of this instance of a HotSpot object. (Overrides Object.ToString().)
Protected method 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.
Top
Explicit Interface Implementations

  Name Description
Explicit interface implemetation Private property IStateManager.IsTrackingViewState Infrastructure. Gets a value indicating whether the HotSpot object is tracking its view-state changes.
Explicit interface implemetation Private method IStateManager.LoadViewState Infrastructure. Restores the HotSpot object's previously saved view state to the object.
Explicit interface implemetation Private method 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.
Explicit interface implemetation Private method IStateManager.TrackViewState Infrastructure. Instructs the HotSpot region to track changes to its view state.
Top
Remarks

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.

Version Information

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0
Platforms

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.
Thread Safety

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

Reference

Other Resources