.NET FAQs Unleashed!
Skip Navigation Links
Interview questions on Design Patterns in .NET
ASP.NET Ajax Interview Questions
Interview questions related to security
C# Interview Questions
ASP.NET Interview Questions
Interview Questions in ASP.NET 2.0
Articles at dotnetuncle.com
Skip Navigation Links
OOPs questions in .NET
Questions on .NET Framework
ADO.NET Interview Questions
Short Answer questions in .NET
Frequently asked differences in .NET
Important commonly used Acronyms in .NET
MS SQL, Oracle SQL Interview Questions
 
    
Dotnetuncle's Tip:

  If the XmlReader.MoveToAttribute returns false, it means that the specified attribute does not exist in the current node where the XmlReader object is reading.

    

What does the Hotspot class in .NET do? What is an ImageMap in ASP.NET?

An ImageMap is an ASP.NET control that allows clicks inside a polygon like (called Hotspot) region in a webpage. Well, that actually means you may create a star-shaped or diamond shaped button. Wow!

There are several pre-defined shapes allowed inside an ImageMap for which templates may be used. For example, for a rectangle, an asp:RectangularHotSpot may be used. For a circle, an asp:CircleHotSpot may be used. And for creating stars & diamonds, an asp:PolygonHotSpot may be used. An image may also be put in an ImageMap which may be specified by its ImageUrl property.

In order to invoke an event, the HotSpotMode property needs to be set to PostBack. Further, if several HotSpots are placed inside an ImageMap, the event of the ImageMap may be passed a value using the PostBackValue property.

Code below shows how to create a Polygon HotSpot using an ImageMap.

<asp:ImageMap ID="ImageMap1" Runat="Server"
ImageUrl="Photo.gif" OnClick="SomeEvent"
AlternateText="Click Here"
HotSpotMode="Navigate">

<asp:PolygonHotSpot
AlternateText="Click Here Too!"
Coordinates="100,150, 250,350, 210,290, 90,350, 60,240"
NavigateUrl="http://www.asp.net"
Target="_blank"/>
</asp:ImageMap>

Bind data to a server control without writing code   Masterpage ContentPage   Nested Masterpage?   SiteMapPath control   Sort GridView   Hotspot class, ImageMap   Update Delete Gridview, Datakeynames  


    
Dotnetuncle's Tip:

  When a reference type is assigned a null value, it means that there is no object being pointed to by the reference address of the reference type.