dropdownlist
dropdownlist绑定后加上默认值
2007-10-30 09:15
DeptManageBLL dmb = new DeptManageBLL(); DataSet dsdmb = dmb.GetDeptList(" 1=1 "); this.DdlDept.DataSource = dsdmb.Tables[0].DefaultView; DdlDept.DataTextField = "DeptName"; DdlDept.DataValueField = "DeptCode"; DdlDept.DataBind(); this.DdlDept.Items.Insert(0, "请选择"); |
insert 插入集合中的指定索引
add添加到集合末尾