RadioButton.RadioButton Constructor
.NET Framework 3.0
Initializes a new instance of the RadioButton class.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
The following code example illustrates how to create new instance of the RadioButton class using the RadioButton constructor.
private void InitializeMyRadioButton()
{
// Create and initialize a new RadioButton.
RadioButton radioButton1 = new RadioButton();
// Make the radio button control appear as a toggle button.
radioButton1.set_Appearance(Appearance.Button);
// Turn off the update of the display on the click of the control.
radioButton1.set_AutoCheck(false);
// Add the radio button to the form.
get_Controls().Add(radioButton1);
} //InitializeMyRadioButton
Community Additions
ADD
Show: