ImageMap control example
Previous | Home | Next |
The ImageMap control provides a server implementation of the HTML
The RectangleHotSpot has four properties to define its region—Top, Left, Right, and Bottom—which contain pixel values. The CircleHotSpot has three properties—x and y to define the center point and Radius to define the circle radius. Both types of controls have the AlternateText property that sets the tooltip text, as well as the HotSpotMode property that defines what action is to be taken when this image region is clicked. If the HotSpotMode is Navigate, the NavigateUrl is used as the URL to navigate to; if it is Postback, the PostBackValue is passed to the event procedure defined by the OnClick property of the ImageMap control.
......................design code................................... ................................................................... <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>........................................................................................................................................ .............................cs code............................... using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void ImageMap1_Click(object sender, ImageMapEventArgs e) { } }Untitled Page
Previous | Home | Next |