How to use Image-Map control in ?

Posted by Ranjeet_8 under ASP.NET category on | Points: 40 | Views : 1932
How to use Image-Map control in
Add this code on ASPX design page

<%-- Set Your image location --%>
<asp:ImageMap ID="ImageMap1" runat="server" ImageUrl="~/images/dog_cat.gif" HotSpotMode="PostBack">
<%-- Set image radius --%>
<asp:CircleHotSpot AlternateText="Dog" Radius="60" X="100" Y="52" PostBackValue="Dog" />
<asp:CircleHotSpot AlternateText="Cat" Radius="60" X="80" Y="120" PostBackValue="Cat" />

Add this code on ASPX.CS page

protected void ImageMap1_Click(object sender, System.Web.UI.WebControls.ImageMapEventArgs e)
Response.Write("You Click " + e.PostBackValue);

Comments or Responses

Login to post response