Solution:
(Change the dropdownlist to the client-side html control select and store it using ajax. There will certainly be no errors.
But here the form has a lot of data to be submitted, so do not consider using the client html Control)
1. <% @ page language = "c #" autoeventwireup = "true" on the page"
Codefile = "default. asp tutorial x. cs" inherits = "_ default" %> Add
Enableeventvalidation = "false ";
2. Add a hidden field <input type = "hidden" id = "inputcity" runat = "server"/>
Then, use js to assign the value of dropdownlist to the hidden domain,
In this way, the background can read the value of the hidden domain through inputcity. value, that is, the value selected by the province and city.
Value
Problem
Use the dropdownlist control on the server side to implement three-level linkage between ajax-free new provinces and cities
Province: <asp: dropdownlist id = "ddlprovince" runat = "server"
Enableviewstate = "false"> </asp: dropdownlist>
City: <asp: dropdownlist id = "ddlcity" runat = "server"
Enableviewstate = "false"> </asp: dropdownlist>
Area: <asp: dropdownlist id = "ddlcounty" runat = "server"
Enableviewstate = "false"> </asp: dropdownlist>
Practice:
When loading a page, first load the "Province" data, and then add the "please select" item to the city and district respectively.
Jquery's $. post () method successfully achieves the smooth implementation of ajax without refreshing new provincial/municipal linkages