日期:2014-05-18  浏览次数:20455 次

幕白兄:DropDownList1绑定后,再添加一列,若将该列设为默认选择列,该怎么写?



DropDownList1.DataBind();//绑定后,再添加一列
this.DropDownList1.Items.Add(new     ListItem( "aa ", "1 "));   //将该列设为默认选择列,下面怎么写?
请帮帮忙,谢谢!

------解决方案--------------------
this.DropDownList1.Items.Insert(0,new ListItem( "text ", "value "));
------解决方案--------------------
this.DropDownList1.Items.Insert(0,new ListItem( "text ", "value "));
正解,
要不是放心,就再 DropDownList1.SelectValue=value
------解决方案--------------------
codeangel(http://www.wSoft.Net)
正解~
------解决方案--------------------
this.DropDownList1.SelectedValue = "1 ";
------解决方案--------------------
DropDownList1.SelectValue= "1 "
DropDownList1.SelectedIndex=3
呵呵