if(((System.Web.UI.HtmlControls.HtmlInputRadioButton)("Radio"+i)).Checked)
......你的("Radio"+i)应为xxx.findcontrol("Radio"+i)xxx是包含你的Radio 控件集合。代码我随手写的。你自己查一下

解决方案 »

  1.   

    .net不提供索引,如果只有几个的话建议还是使用人工的方式,否则,就可以用arraylist动态添加的方法初始化,然后可以用arraylist1.Item(i)取出
      

  2.   

    To: csqok(csq) 
      我已经查过啦。我是把radio 组名是Modexxx是包含你的Radio 控件集合。这是什么集合呀!!
      

  3.   

    如果你是直接放在页面上的话,你就是 this.FindControl("") 看看能不能找到你的Radio
      

  4.   

    for(int i=1;i<3;i++)
    {  
    if(((System.Web.UI.HtmlControls.HtmlInputRadioButton) this.FindControl("Radio"+i)).Checked)
    Response.Write(i);
    else
    Response.Write(((System.Web.UI.HtmlControls.HtmlInputRadioButton) this.FindControl("Radio"+i)).Value);
    }