[英]AJAX + ASP.net to retrieve data from Sql Server?
I'm looking to dynamically control a set of drop downs so that they'll filter their items after another drop down's index has been changed. 我希望动态控制一组下拉菜单,以便它们在更改另一个下拉列表的索引后过滤其项目。
I'm working in C#/ASP.net and it would be great if I could get the necessary data straight from Sql Server. 我正在C#/ ASP.net中工作,如果我可以直接从Sql Server获取必要的数据,那就太好了。 I suppose I could generate an xml file whenever new data is uploaded to the server but that sounds like a pain.
我想每当新数据上传到服务器时我都可以生成一个xml文件,但这听起来很痛苦。
Is there an obvious way to do what I need to do? 有什么明显的方法可以做我需要做的事吗?
Check out the CascadingDropDown Control . 检出CascadingDropDown控件 。 It's part of the ASP.NET Ajax Control Toolkit.
它是ASP.NET Ajax控件工具包的一部分。
您可以使用一个下拉列表的onchange事件,并且可以使用ajax更改另一个下拉列表的内容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.