Get the App
SLTechnology News&Howtos  ›  Development  › 

How to understand HTML Map controls in ASP.NET

Shulou Source: shulou.com Published: 2022-06-03 06:25:19 11月16日 Update

How to understand the HTML Map control in ASP.NET, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.

I'll show you how to use the ASP.NET AJAX framework to extend HTML Map controls that add clickable hotspots. After expansion, when our mouse moves over these hotspots, details about these hotspots pop up; however, these details are obtained from the remote service asynchronously through AJAX.

I. brief introduction

First, we notice that a server control, ImageMap, is also provided in ASP.NET 2.0. This control is a server control that allows you to define a HotSpot area on a picture. Users can PostBack or forward to a URL address by clicking on these hotspots. Typically, this control is used to interact with the local range of a picture. However, the drawback of this control is that clicking on these hot areas for postback will result in a refresh of the entire Web page.

In this article, we will extend the common HTML Map control based on ASP.NET AJAX technology to make it adapt to the trend of Web 2.0 application development by only partially updating the page when displaying the relevant details when clicking on the hot area on it.

Second, create an AJAX sample website

Start Visual Studio 2005 and select "File → New website …" Then select the "ASP.NET AJAX-Enabled Web Site" template, name the project "Ajax_ImageMap", and select C# as the built-in supporting language, * Click OK.

Then, add a new ASPX page, ImageMap.aspx, and modify the part of the HTML code as follows:

Tags: Services hotspots controls information methods data regions methods servers pages functions clients clients related selections two code elements pictures partial Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Technology Shulou Information NVidia Redmi