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:
private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                label1.Text = "Radio 1 Selected";
            }
            else {
                label1.Text = "Radio 1 Unselected";
            }

        }

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Followers

Total Pageviews

Powered by Blogger.

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -