本文介绍了如何在多个Dropdownlist中显示相同的列字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有



 strQry =  从ShiftLite中选择CodeC; 
DataTable dt2 = new DataTable();
dt2 = DbCon.GetData(strQry);
DropDownList1.DataSource = dt2;
DropDownList1.DataTextField = CodeC;
DropDownList1.DataBind();
DropDownList1.Items.Insert( 0 new ListItem( - SELECT - ));







这里我想要从数据库中检索的相同字段我想显示多个DropDlist如DropDownList2,DropDownList3,DropDownList4,DropDownList5



有没有办法轻松搞定



谢谢你!

解决方案



Hi, ALL

strQry = "select CodeC from ShiftLite";
DataTable dt2 = new DataTable();
dt2 = DbCon.GetData(strQry);
DropDownList1.DataSource = dt2;
DropDownList1.DataTextField = "CodeC";
DropDownList1.DataBind();
DropDownList1.Items.Insert(0,new ListItem("--SELECT--",""));




here i want same fields which i retrieve from database i want to display multiple dropdownlist like DropDownList2, DropDownList3,DropDownList4, DropDownList5

Is there any way to get easly

thanks you !

解决方案



这篇关于如何在多个Dropdownlist中显示相同的列字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 21:12