Dim c As Object
        Dim rbtn As RadioButtonList
        For Each c In Page.Controls(1).Controls
            If TypeOf (c) Is CheckBox Then
                rbtn = CType(c, CheckBox)
                rbtn.Enabled=true
            End If
        Next
---------------------------------------RadioButton1同上.

解决方案 »

  1.   

    Page.Controls(1)是什么意思???
      

  2.   

    以上代码中  Dim rbtn As RadioButtonList不对吧
      

  3.   

    Page.Controls(1)是页面上的formforeach(Control c in Page.Controls[1].Controls)
    {
    if(c.GetType().ToString()="System.Web.UI.WebControls.CheckBox")
    ((CheckBox)c).Enabled =false;
    }
    }
      

  4.   

    谢谢2002pine(我爱你江南的雪儿); smilnet(笨笨)