ASP dropdownlist1(如果选择)将列表添加到另一个dropdownlist2 [英] ASP dropdownlist1 if selected add list to another dropdownlist2

查看:71
本文介绍了ASP dropdownlist1(如果选择)将列表添加到另一个dropdownlist2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的exprt,

以下代码无效,你能不能协助。

below code is not working, can you assist.

我正在尝试从dropdownlist1中选择dropdownlist2中的列表

I'm trying to add list in dropdownlist2 in selection from dropdownlist1



protected void DDList1_SelectedIndexChanged(object sender,EventArgs e)

        {


protected void DDList1_SelectedIndexChanged(object sender, EventArgs e)
        {

           

            if(DDList1.SelectedValue ==" 1")

               {

           
            if (DDList1.SelectedValue == "1")
               {

       

                   DDList2.Items.Add(new ListItem(" Ground Floor"," 0"));;
                    DDList2.Items.Add(new ListItem(" 1st Floor"," 1"));;
             

                 


               }

       
                   DDList2.Items.Add(new ListItem("Ground Floor", "0"));
                   DDList2.Items.Add(new ListItem("1st Floor", "1"));
            
                 
               }

              

              

        }

        }

Support@Mytechnet.me

Support@Mytechnet.me

推荐答案

http://forums.asp.net/


这篇关于ASP dropdownlist1(如果选择)将列表添加到另一个dropdownlist2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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