简体   繁体   English

ASP.NET中Ajax的相互依赖下拉列表

[英]Interdependent dropdownlists by Ajax in ASP.NET

I have 2 dropdownlists ( ddl_customername ), and ( ddl_customercode ). 我有2个下拉列表( ddl_customername )和( ddl_customercode )。

I have sqldatasource1 (select customername, customercode from tbl_customers) 我有sqldatasource1 (select customername, customercode from tbl_customers)

I want to change the selecteditem in my dropdownlists depending on the selected item of the other using AJAX, 我想改变selecteditem在我dropdownlists取决于其他使用AJAX的选择项,

The issue looks very basic but I am not able to implement the structure to achieve that goal. 这个问题看起来非常基础,但是我无法实现该目标的结构。 How can I achieve it? 我该如何实现?

Make a wcf service for your ajax calls. 为ajax调用提供wcf服务。 You can get lots of value with wcf and jquery. 您可以通过wcf和jquery获得很多价值。

http://www.codeproject.com/Articles/128478/Consuming-WCF-REST-Services-Using-jQuery-AJAX-Call http://www.codeproject.com/Articles/128478/Consuming-WCF-REST-Services-Using-jQuery-AJAX-Call

http://ajax.net-tutorials.com/basics/introduction/ http://ajax.net-tutorials.com/basics/introduction/

Covering the 2 dropdownlist with update panels, and giving triggers to one another solves the problem. 用更新面板覆盖2个下拉列表,并相互触发可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM