简体   繁体   中英

Interdependent dropdownlists by Ajax in ASP.NET

I have 2 dropdownlists ( ddl_customername ), and ( ddl_customercode ).

I have 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,

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. You can get lots of value with wcf and jquery.

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

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

Covering the 2 dropdownlist with update panels, and giving triggers to one another solves the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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