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同上.
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同上.
{
if(c.GetType().ToString()="System.Web.UI.WebControls.CheckBox")
((CheckBox)c).Enabled =false;
}
}