How to Use Image-Map control in ?

Posted by Ranjeet_8 under VB.NET category on | Points: 40 | Views : 4288
Add this code on ASPX.VB Page

Protected Sub ImageMap1_Click(sender As Object, e As System.Web.UI.WebControls.ImageMapEventArgs) Handles ImageMap1.Click
Response.Write("You Click " + e.PostBackValue)
End Sub

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" />

Comments or Responses

Login to post response