如何根据选择从下拉列表中获取地区,州和国家? [英] how to get districts and states and countries from drop down list based on selection?

查看:109
本文介绍了如何根据选择从下拉列表中获取地区,州和国家?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我必须根据他们选择的地区,州和国家来保存用户地址详细信息如何在我的应用程序中拥有这些所有国家,州,地区?帮助我

提前致谢

解决方案

您需要在数据库中为国家/地区创建不同的表格, States Districts

从这些表中提取数据并填充 DropDownLists



用户选择所有 DropDownList 并提交数据后,您需要获取每个 DropDownList 的SelectedValues 并根据这些值制定 SQL查询



然后在 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 the DropDownLists.

After user selects all the DropDownList and Submits the data, you need to get the SelectedValues of each DropDownList and formulate a SQL Query based on those values.

Then execute the SQL Query with the help of ADO.NET Objects.

That's it. :)


这篇关于如何根据选择从下拉列表中获取地区,州和国家?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆