C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to use Image Map Control


Posted Date: 15 May 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms
Author: selva venkateshMember Level: Gold    
Rating: Points: 10



The ASP.NET designers have done is to wrap the image map concept up as a control, so that you don't have to write HTML directly. Instead, you handle everything just by setting properties. This is consistent with the way that the rest of the native ASP.NET controls work.

Hot spots features
There is no limit on number of hotspots each image may contain.

Each hotspot is characterized by various attributes like shape, location and size.

Overlapping hotspots are perfectly valid.

Hot spots are defined using x and y coordinates.

Hot spots can be assigned Image URL's and are capable of postback.

Different types of hot spots
There are three different types of hot spots offered by ImageMap control. They are: CircleHotspot , RectangleHotspot and PolygonHotspot

The following code sample shows how to use Image Map Control


<asp:ImageMap ID="ImageMap1" runat="server"
Height="220px" ImageUrl="~/Servers.gif"
Width="420px">
<asp:RectangleHotSpot Bottom="220"
HotSpotMode="Navigate"
NavigateUrl="~/Server1.aspx"
Right="140" AlternateText="Server 1" />
<asp:RectangleHotSpot Bottom="220"
HotSpotMode="Navigate" Left="141"
NavigateUrl="~/Server2.aspx"
Right="280" AlternateText="Server 2" />
<asp:RectangleHotSpot Bottom="220"
HotSpotMode="Navigate" Left="281"
NavigateUrl="~/Server3.aspx"
Right="420" AlternateText="Server 3" />
</asp:ImageMap>




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Image Map Control  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Login form and Storing Username and Password in we
Previous Resource: How to Encrypt and Decrypt Password
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use