从数据库取出RadioButtonList选中的值
string str = "体育";//这一项可以从数据库中读出
for (int j = 0; j < this.RadioButtonList1.Items.Count; j++)
{
if (str == this.RadioButtonList1.Items[j].Text.ToString())
{
this.RadioButtonList1.Items[j].Selected = true;
}
}
从数据库取出RadioButtonList选中的值
string str = "体育";//这一项可以从数据库中读出
for (int j = 0; j < this.RadioButtonList1.Items.Count; j++)
{
if (str == this.RadioButtonList1.Items[j].Text.ToString())
{
this.RadioButtonList1.Items[j].Selected = true;
}
}
转载于:https://www.cnblogs.com/JemBai/archive/2010/06/18/1760361.html