如何将数据库中的值显示在web页面上的下拉式菜单中 我的做法,已被证明是错误的Dropdownlist1.SelectedValue = reader1["Status"].ToString() 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 LegalSystem.Components.TCAJ tcaj = new LegalSystem.Components.TCAJ(); SqlDataReader Dr = tcaj.GetDDLTransactDept(); DDLst_TransactDept.DataSource = Tool.ConvertDataReaderToDataTable(Dr); DDLst_TransactDept.DataValueField = "id"; DDLst_TransactDept.DataTextField = "TransactDeptName"; DDLst_TransactDept.DataBind(); DDLst_TransactDept.Items.Insert(0, new ListItem("--请选择经办单位--","")); Dr.Close(); Dropdownlist1.DataSource = 数据集;Dropdownlist1.DataValueField = “ID”;Dropdownlist1.DataTextField = "Value";Dropdownlist1.DataBind(); CSDN is always a good friend 关闭网页C,刷新网页A,如何实现? C# 实时存储问题——在线等 【在线】新手上路。。。几道简单小题,恳请热心朋友帮个小忙,谢谢 求SQL语句 进程冲突问题 VB的DateSerial函数 在C#里面是什么?急。。在线等。 一列字符串分组,求各位给点思路 100分求考试系统自动评分设计思路 C# 一个groupbox覆盖另一个groupbox 求教:acess 数据库备份的问题???? C#写的俄罗斯方块游戏,欢迎提出宝贵意见! 刚做完一个日历控件,仿windows的日期时间属性窗口。
SqlDataReader Dr = tcaj.GetDDLTransactDept();
DDLst_TransactDept.DataSource = Tool.ConvertDataReaderToDataTable(Dr);
DDLst_TransactDept.DataValueField = "id";
DDLst_TransactDept.DataTextField = "TransactDeptName";
DDLst_TransactDept.DataBind();
DDLst_TransactDept.Items.Insert(0, new ListItem("--请选择经办单位--",""));
Dr.Close();
Dropdownlist1.DataValueField = “ID”;
Dropdownlist1.DataTextField = "Value";
Dropdownlist1.DataBind();