如何在ASP中将DropDownList与国家,州和城市绑定。净 [英] how can i bind DropDownList with country, state and city in ASP. NET

查看:74
本文介绍了如何在ASP中将DropDownList与国家,州和城市绑定。净的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在ASP中将DropDownList与国家,州和城市绑定。 NET

how can i bind DropDownList with country, state and city in ASP. NET

推荐答案

你有没有尝试过?这是非常基本的。最简单的方法是 - 在DataTable / DataSet中获取Country / City / State的值。

然后只有2个语句完成这项工作:

Did you try anything? It''s very basic. The simplest method is - get the values of Country/City/State in a DataTable/DataSet.
Then there are just 2 statements which does the job:
DropDownListID.DataSource = DataTableName;
DropDownListID.DataBind();


这篇关于如何在ASP中将DropDownList与国家,州和城市绑定。净的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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