ASP.NET 2.0 contains two graphic controls, one is Image and the other is ImageMap control.
1. The Image control is used to display images, corresponding to the <img /> tag. The typical Image control format is as follows
<asp:Image
id="imgRandom"
ImageUrl="Picture.gif"
AlternateText="Picture"
DescriptionUrl=""
GenerateEmptyAlternateText=""
ImageAlign=""/>
id is used to identify the control.
ImageUrl is the image link,
AlternageText is the text displayed when the image cannot be displayed.
DescriptionUrl provides a link to a detailed description of the image
GenerateEmptyAlternateText Set AlternateText to empty
ImageAlign is used to provide position relative to other HTML elements. Possible values are AbsBottom, AbsMiddle, Baseline, Bottom, Left, Middle, NotSet, Right, TextTop, Top
2. The ImageMap control can also be used to display images, but it can produce different effects depending on where you click. The typical ImageMap control format is as follows
<asp:ImageMap
id="mapMenu"
ImageUrl="MenuBar.gif"
HotSpotMode="PostBack"
Runat="server" OnClick="mapMenu_Click">
<asp:RectangleHotSpot
PostBackValue="ToUpper"
Left="0"
Top="0"
Right="100"
Bottom="30"
AlternateText="To Uppercase" />
<asp:RectangleHotSpot
PostBackValue="ToLower"
Left="100"
Top="0"
Right="200"
Bottom="30"
AlternateText="To Uppercase" />
<asp:RectangleHotSpot
PostBackValue="Erase"
Left="200"
Top="0"
Right="300"
Bottom="30"
AlternateText="To Uppercase" />
</asp:ImageMap>
No need to explain id and ImageUrl.
<asp:RectangleHotSpot /> represents the rectangular click area
<asp:PolygonHotSpot /> represents a polygon area
<asp:CircleHotSpot /> represents a circular area
The above procedure is often used where the entire image is used for navigation.
ImageMap can return data, the above HotSpotMode="PostBack" and PostBackValue="Erase", when the corresponding image area is clicked, the event mapMenu_Click is triggered, and PostBackValue can be used to call the returned PostBackValue.
Original source: http://blog.sina.com.cn/u/538461ee010005lz