将DropDownList1.SelectedValue =*** 换成
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue("***"));
即可,“***”为默认的值,
如:
DropDownList1.SelectedValue = rs["name"].ToString();
换成
换成
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue(rs["name"].ToString()));
转载于:https://blog.51cto.com/ccj188/105716