Validating radio button groups
To run this example, paste the code into a Windows Form. Auto Dispatch)] public class Radio Button : System. The example uses the Checked Changed event to track which Radio Button is selected and reports the text of the selected Radio Button when the user clicks a Button. The difference is that multiple Check Box controls can be selected at the same time, but option buttons are mutually exclusive. Radio Button and Check Box controls have a similar function: they offer choices a user can select or clear.If a more compact presentation is desirable, consider using a dropdown component.The Radio Button tag renders as a radio button and associated label at run-time.
To save the index instead of a value, use radio buttons by index.
The option button's appearance can be altered to appear as a toggle-style button or as a standard option button by setting the Appearance property.
Use the Checked property to get or set the state of a Radio Button.
To create multiple groups on one form, place each group in its own container, such as a Group Box or Panel control.
All Radio Button controls in a given container, such as a Form, constitute a group.
Button Base The following code example creates and initializes two Radio Button controls in a Group Box.