如何仅在下拉列表中查看选定丝绒的列表 [英] How to view only the list of the selected velue in a dropdownlist

查看:63
本文介绍了如何仅在下拉列表中查看选定丝绒的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有2个下拉列表1:具有0-12年级的成绩列表,并且菜单上还有ECD.另一个2:菜单上有学校和ECD学校的列表.所以我想当你在第一个下拉列表中选择ECD时,必须仅在第二个下拉列表中显示ECD学校的列表.请帮助

Hi, i have 2 Dropdownlist 1: has list of Grades from Grade0-12 and also ECD on the menu. and another one 2: has the list of schools and ECD schools on the menu. so i want when u select ECD on the 1st dropdownlist must show the list of ECD school only on the 2nd dropdwnlist. pls help

推荐答案

在ispostback中添加ECD下拉值,然后尝试以下代码,

Add ECD dropdown values in ispostback,then try below code,

protected void ECDdd_SelectedIndexChanged(object sender, EventArgs e)
    {
try
{

if (ds.Tables[0].Rows.Count > 0)
            {
                ECDschooldd.Items.Clear();
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    
                     ECDschooldd.Items.Add(ds.Tables[0].Rows[i].ItemArray[0].ToString());
                }


}                

            }


这篇关于如何仅在下拉列表中查看选定丝绒的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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