- Back to Home »
- Windows Applications »
- RadioButton
Posted by :
Sudhir Chekuri
Monday, 15 February 2016
Allows the user to select a single option from group of available options.
Default event: CheckedChanged which is fired when the radio button is checked or unchecked.
Example code to display selection status of radiobutton on a label:
Default event: CheckedChanged which is fired when the radio button is checked or unchecked.
Example code to display selection status of radiobutton on a label:
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
label1.Text = "Radio
1 Selected";
}
else {
label1.Text = "Radio
1 Unselected";
}
}