我在RadioButton中使用了GroupName设置了多个RadioButton为同一组,如何获取该组的值呢?

解决方案 »

  1.   

    我也没想到好办法,我是这样处理的:RadioButton rdo=new RadioButton();
    string sltTmp="tmp1";
    for(int i=1;i<9;i++)
    {
    rdo=(RadioButton)this.FindControl("tmp"+i.ToString());
    if(rdo.Checked==true)
    {
    sltTmp="tmp"+i.ToString();
    break;
    }
    }
    int memId=Convert.ToInt32(MySession.getSession("memId"));
    string sqlStr="update t_Member_Member set memTmp='"+sltTmp+"' Where ID="+memId;
      

  2.   

    你用 RadioButtonList
    就什么问题都解决了。
      

  3.   

    RadioButtonList  在工具栏没有找到这个呀!!
      

  4.   

    怎么可能没有RadioButtonList?实在找不到,在工具栏里点右键看看能不能追加进去。