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添加到集合末尾

posted @ 2009-06-29 20:16  awp110  阅读(166)  评论(1编辑  收藏  举报