不选也不行?
以下语句可行
sqlDataAdapter1.Fill(ds);
DropDownList2.DataSource=ds;
DropDownList2.DataBind();
DropDownList2.SelectedIndex=2;
但这句不行,为什么?
sqlDataAdapter1.Fill(ds);
DropDownList2.DataSource=ds;
DropDownList2.DataBind();
DropDownList2.SelectedIndex=-1;
还是选择了第一个.也就是说想在初始时什么也不选中是不行的.
还有就是一但Databind()之后,DropDownList中的内容就不
能人手输入了(只能选其中一个),有什么办法?