从数据库取出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;
 }
}

相关文章:

  • 2021-11-20
  • 2021-07-29
  • 2021-06-17
  • 2021-10-26
  • 2021-10-28
猜你喜欢
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2022-12-23
相关资源
相似解决方案