一个下拉列表值依赖于另一个下拉列表 [英] one dropdownlist values depend to another dropdownlist
本文介绍了一个下拉列表值依赖于另一个下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好......
如何创建两个依赖于另一个的下拉列表...
例如第一个下拉列表值是A和B
当选定的第二个下拉列表值设置为1和2
并且当B选择第二个下拉列表值设置为3和4时
解决方案
使用SelectedIndexChanged
第一个DropDownList
的事件。
在该事件中,检查SelectedValue
那个DropDownList
并根据它绑定第二个DropDownList
。
Hi there...
how can i create two dropdownlist that depend to another..
for example first dropdownlist values are A and B
when A selected second dropdownlist values set to 1 and 2
and when B selected second dropdownlist values set to 3 and 4
解决方案
UseSelectedIndexChanged
Event of firstDropDownList
.
Inside that Event, check theSelectedValue
of thatDropDownList
and bind the SecondDropDownList
according to that.
这篇关于一个下拉列表值依赖于另一个下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文