Tuesday, 27 December 2011

IMAGEMAP

 <asp:ImageMap ID="ImageMap1" runat="server" HotSpotMode="Navigate" Height="300" Width="600" ImageUrl="~/image/Chrysanthemum.jpg">
      
        <asp:CircleHotSpot HotSpotMode="Navigate" NavigateUrl="~/Default3.aspx"
            Radius="10" Target="_new" X="80" Y="80" />
   
    </asp:ImageMap>

ALTERNATIVE EXAMPLE
<asp:ImageMap ID="ImageMap1" runat="server" HotSpotMode="PostBack" Height="300"
            Width="600" ImageUrl="~/image/Chrysanthemum.jpg" onclick="ImageMap1_Click">
        <asp:RectangleHotSpot AlternateText="RAM" Bottom="225" Left="0"
            PostBackValue="SIV" Right="150" Top="0" />
             <asp:RectangleHotSpot AlternateText="OOM"
            PostBackValue="HARI"   Top="0" Bottom="225" Left="151" Right="300" />
    </asp:ImageMap>
CLICK EVENT:
protected void ImageMap1_Click(object sender, ImageMapEventArgs e)
    {
        Response.Write(""+e.PostBackValue.ToString()+"");
    }



No comments:

Post a Comment