且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

详细信息视图中的DataBound下拉列表

更新时间:2023-02-11 19:51:43

只需使用通用列表从数据库中添加列表中的值并以这种方式绑定

dropdownlist.Items.Add(new ListItem( - Select - ,0));

选择是您的项目,0是值
Just Use a Generic List add Values in List from database and Bind in this way
dropdownlist.Items.Add(new ListItem("-- Select -- ", "0"));
"Select is your Item and 0 is the value "