Hi,
How do you append radiobutton names. (radioButton1....and so on)
This is what I have :
String nameRadio = "";
for (int i=0; i < 24; i++){
nameRadio = "radioButton" + i.ToString();
//nameRadio.Checked = false
}
Thanks a bunch.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Jul 25, 2007, 4:57 PM
for (int i=0; i < 24; i++)
{
RadioButton nameRadio = (RadioButton)this.Controls["radioButton" + i.ToString()];
nameRadio.Checked = false;
}
If the RadioButtons are in a container (such as a GroupBox or Panel) rather than directly on the form, then replace 'this' with the name of the container.