HotSpotCollection Class
Assembly: System.Web (in system.web.dll)
The HotSpotCollection class represents a collection that enables an ImageMap control to maintain a list of the HotSpot objects it contains.
Use the Add method to add a specified HotSpot object to the collection at the end of an ordinal index array. Use the Insert method to add a HotSpot object to the collection at a specified index location. Use the Item indexer to directly access a HotSpot object in the collection at a specified index, using simple array notation.
Use the Remove method to remove a HotSpot object from the end of the collection. Use the RemoveAt method to remove a HotSpot object from a specified index location.
The following code example demonstrates how to programmatically create an ImageMap control and add two CircleHotSpot objects to it. The HotSpots property is used to access the HotSpotCollection collection for the ImageMap control and add the CircleHotSpot objects to it. For this example to work correctly, you must supply your own image for the ImageUrl property and update the path to the image appropriately so that the application can locate it.
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.