| |||||
ImageMap Control SyntaxASP.NET Syntax ASP.NET Syntax for Web Controls Creates a control that displays an image on a page. When a hot spot region that is defined within the ImageMap control is clicked, the control either generates a postback to the server or navigates to a specified URL. For information on the individual members of this class, see ImageMap in the class library. RemarksThe ImageMap control renders an image that can contain custom-defined hot spot regions. When a user clicks a hot spot region, the control can either generate a postback to the server or navigate to a specified URL. If you only need to capture the coordinates where the user clicked, and do not require the hot spot capabilities, the Image control can be a serviceable alternative. Syntax ExampleThe following example demonstrates how to create an ImageMap control declaratively that contains RectangleHotSpot and CircleHotSpot objects. The HotSpot property is set to HotSpotMode.Navigate, which causes the page to navigate to the specified URL each time a user clicks one of the hot spot regions. <asp:imagemap id="solarsys"
imageurl = "~/abkd/shared/images/solarsys.gif"
width=504 height=126
alternatetext = "Solar System"
runat="Server">
<asp:rectanglehotspot
alternatetext = "Sun"
left=0 top=0 right=76 bottom=122
hotspotmode = "Navigate"
navigateurl = "/aspxtreme/shared/images/sun.gif"
target = "_blank" />
<asp:circlehotspot
navigateurl = "/aspxtreme/shared/images/mercury.gif"
x=90 y=61 radius=15
hotspotmode = "Navigate"
alternatetext = "Mercury"
target = "_blank" />
<asp:circlehotspot
navigateurl = "/aspxtreme/shared/images/venus.gif"
x=124 y=61 radius=18
hotspotmode = "Navigate"
alternatetext = "Venus"
target = "_blank" />
... other hot spot definitions here ...
</asp:imagemap>
See AlsoImageMap Class ImageMap Web Server Control |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme