How to use ImageMap Control in asp.net using c#

1.File-> New-> Website->  ASP.NET Web Site(Visual C#) -> Ok

(Now You will see a Default.aspx page. To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add)


2.Solution Explorer->Right click on Project name->Click New Folder->name this folder as Images and add your desired image in this folder
ImageMap Control
3.ToolBox->Double click on ImageMap->Right click on ImageMap->select properties-> Change HotSpotMode to "PostBack" ->
ImageMap Control Properties


























4.click on ImageUrl Properties->you will prompt a pop up window like this->select your desired image->ok
asp.net image map control





















5.Click HotSpots Properties->you will prompt a window->click Add(to add hotspot area you can add many hotspot)->change radius,x and y to shown your area)->also change AlternateText and PostBackValue->ok
 6.Right Click on ImageMap->select Properties->click Events->double click on click Events(to get code behind)













And write this code
 7.click F5 to run your project->ok
Respond to a user click in ImageMap control

























Respond to a user click in ImageMap control




















No comments:

Post a Comment