如何链接两个Drop DownsBox. [英] How to link two Drop DownsBox.

查看:73
本文介绍了如何链接两个Drop DownsBox.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想链接两个DropDown,以便一个下拉列表中的选择在其他下拉列表中进行必要的更改,并在相应的字段中显示该详细信息....

不是 e:我正在从SQL数据库的下拉列表中获取数据.

解决方案

让我们说您有2个名为A和B的下拉列表.选定的A值更改时,您将在B中执行某些操作.如果这是您的情况,则需要设置 ^ ] A的属性为true.并在 SelectedIndexChanged [控件 [ ^ ].


您可以具有级联的下拉菜单(如Abhinav所说)以及普通的下拉菜单(由JQuery& JSON辅助).请向我的 answer 咨询类似的问题.


I want to link two DropDown such that selection in one dropdown make necessary changes in other and display that detail in respective fields.......

Note:I am getting data in drop down from SQL Database.

解决方案

Lets say you have 2 dropdownlists named A and B. When selected value of A changes, you do something in B. If this is your scenario, you need to set the AutoPostBack[^]property of A to true. And on the SelectedIndexChanged[^] event of A, you put what you need to do to B.


You can have a look at the AJAX cascading drop down control[^].


You can have cascading dropdowns (as Abhinav said) as well as normal dropdowns (aided by JQuery & JSON). Refer my answer to a similar question.


这篇关于如何链接两个Drop DownsBox.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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