无法获取RadioButtonList选中的项
绑定数据的代码为:
string sql = "Select * from VoteDetail where id="+ID;
SqlDataReader sdr=DB.ExecSqlReader(sql);
RadioButtonList1.DataSource = sdr;
RadioButtonList1.DataTextField = "VoteItem";
RadioButtonList1.DataValueField = "VoteDetaileId";
RadioButtonList1.DataBind(); //将数据绑定到单选列表控件
sdr.Close();
string Sql = "Update from VoteDetail where VoteDetaileId=" + this.RadioButtonList1.SelectedValue;
在明明已经选择了一项的情况下,取出的却是空值!
求教