0

i am using c# and i have radion buttons that i want to check them, then when i click ok button it takes me to the required form corresponding to the text on the radio button.
thanks

4
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by Mitja Bonca
0

So you want to add code in your button click that clicks if the particular radio button is checked and redirect as appropriate.

if(RadioButton1.Checked) {
  // do something
} else if (RadioButton2.Checked) {
    // do something else
}

Is that what you are after?

0

yes i have done that. but between the culy brackets i want to navigate to another form.
i want to go to the donation table when i have checked the radio button and clicked the ok button.
so what should i put in between the { } so that i can navigate to the other form.

0
if (RadioButton1.Checked)
{
Form30.Show();
}

I believe that is what you want.
If not say something.

Hope this helps. :)

0

This code:

if(RadioButton1.Checked) 
{
    Form2 f2 = new Form2();
    f2.Show();
} 
else if (RadioButton2.Checked)
{
    // do something else
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.