But how could you live and have no story to tell!
访问统计 original graphics

“DropDownList“有一个无效 SelectedValue,因为它不在项目列表中。出现这个错误的原因是由于在给DropDownList赋值的时候,要给DropDownList赋值的数据在DropDownList项目中已经不存在了。绑定数据的时候用下面这种方式,就可以解决了。
DropDownList.SelectedIndex = DropDownList.Items.IndexOf(DropDownList.Items.FindByValue (myReader[0].ToString()));

posted on 2007-06-08 14:13  nextsoft  阅读(1587)  评论(1编辑  收藏  举报