to make it easier, i need to loop through all the radio buttons so that it is more manageable, i use the code below:

Me.Controls("RadioButton" & i).Checked = True

However, i get this error message:
Checked is not a member of System.Web.UI.Page

Anyone know what is the problem? Thanks....

you can use this method:
Dim c As Control
For Each c In Page.FindControl("Form1").Controls
If TypeOf c Is RadioButton Then
If CType(c, RadioButton).Checked = True Then
Response.Write(c.ID)
End If
End If
Next

You will have to set the same Groupname for the Radiobuttons so that only one is selected at a time. If the radiobuttons are in a Panel -you will have to replace "Form1" with the name of the Panel.Else, use the RadioButtonlist control--much easier and better.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.