JQuery's AJAX function and asp.net are used to achieve the three-level linkage effect between provinces, cities, and cities. Other second-level, third-level, or multi-level linkages can also be achieved using this method. For more information, see, I hope this article will help you introduce how to use jQuery's AJAX function and asp.net to achieve the three-level linkage effect between provinces and municipalities. Other second-level, third-level, or multi-level linkages can also be completed in this way.
The data table involved in this article is City, for convenient management.
Design this table as follows
ID: auto-increment Field
City_Name: city name
City_Code: city code
We can query the province, city, and District Based on the city code. The city code structure is roughly as follows:
Inner Mongolia: 150000, Hohhot: 150100, Xincheng District: 150101.
The code for other regions is the same as that for provincial numbers + 0000, municipal numbers + 00, and regional numbers + municipal numbers + regional numbers.
The City. ASPX code is:
The Code is as follows:
JQuery + ASP. NET achieves three-level linkage