如何在某些情况下将下拉列表数据发送到另一个下拉列表 [英] how to send dropdownlist data to another dropdownlist with some condition

查看:54
本文介绍了如何在某些情况下将下拉列表数据发送到另一个下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉别人如何在一定条件下将一个下拉列表数据发送到另一个下拉列表,
就像我正在开发一个属性应用程序,其中用户从一个下拉列表中选择40个不足量,而另一个下拉列表自动显示大于40个不足的值.
因此,只要用户从第一个下拉列表中选择某个值,第二个下拉列表就会显示更大的值.

解决方案

使用selectedindexchanged第一个下拉列表并在该条件下填充另一个.


在dropdown1选定的indexchaged事件中绑定dropdown2;


 受保护的 无效 DropDown1_SelectedIndexChanged(对象发​​件人,EventArgs e)
        {
     ---写下您的连接详细信息并调用存储过程或在下面的查询中写
      ------从表中选择数量 其中 amount> DropDown1.selected.item.Text;
            DropDown2.bind();
        } 


Please someone tell that how to send one dropdownlist data to another dropdownlist with some condition,
like I am developing a property application in which user select 40 lack amount from one dropdownlist and another dropdownlist automatically shows the values greater than 40 lack.
So whenever user select some value from 1st dropdownlist, the second dropdownlist shows the greater value

解决方案

use selectedindexchanged of first dropdownlist and populate the other on that condition.


hi
bind dropdown2 in dropdown1 selected indexchaged event;


protected void DropDown1_SelectedIndexChanged(object sender, EventArgs e)
        {
     --- write your connection details and call stored procedure or write below Query
      ------Select ammount from table where amount>DropDown1.selected.item.Text;
            DropDown2.bind();
        }  


这篇关于如何在某些情况下将下拉列表数据发送到另一个下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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