How do you traverse through all radiobuttons on a form
Hi All,
I have a bunch of radio buttons on my webform. What I do is only allow one to be checked at a time. But now I want to be able to tell which one is the one that is checked. Is there a way to do something like:
foreach (Radiobutton r in this.Controls)
{
if (r.Checked == true)
{
.....
}
}
Obviously the above code doesn't work, but is there a way to do something like that. I don't know the syntax to do it. Please help if you can.
Thanks,
Zach(Nevermore)