一个下拉列表值依赖于另一个下拉列表 [英] one dropdownlist values depend to another dropdownlist

查看:131
本文介绍了一个下拉列表值依赖于另一个下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好......

如何创建两个依赖于另一个的下拉列表...

例如第一个下拉列表值是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

解决方案

Use SelectedIndexChanged Event of first DropDownList.
Inside that Event, check the SelectedValue of that DropDownList and bind the Second DropDownList according to that.


这篇关于一个下拉列表值依赖于另一个下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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