更新时间:2022-10-19 14:48:31
您需要在数据库中为国家/地区创建不同的表格, States 和 Districts 。
从这些表中提取数据并填充DropDownLists
。
用户选择所有DropDownList
并提交数据后,您需要获取每个
并根据这些值制定 SQL查询。DropDownList
的SelectedValues
然后在ADO.NET
对象的帮助下执行 SQL查询。
就是这样。 :)
in my project i have to save user address details based on their selection of districts and states and countries how can i have these all country,state,districts in my application? help me out
Thanks in advance
You need to create different Tables in your Database for Countries, States and Districts.
Pull data from those tables and populate theDropDownLists
.
After user selects all theDropDownList
and Submits the data, you need to get theSelectedValues
of eachDropDownList
and formulate a SQL Query based on those values.
Then execute the SQL Query with the help ofADO.NET
Objects.
That's it. :)