Answers for "if radio button checked c#"

1

c# sharp radio button in html how to

using System;
using System.Drawing;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            radioButton1.Checked = true;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked == true)
            {
                MessageBox.Show ("You are selected Red !! ");
                return;
            }
            else if (radioButton2.Checked == true)
            {
                MessageBox.Show("You are selected Blue !! ");
                return;
            }
            else
            {
                MessageBox.Show("You are selected Green !! ");
                return;
            }
        }
    }
}
Posted by: Guest on July-22-2020
0

c# radio button checked

if(radioButton1.Checked = true;)
  {

  }
Posted by: Guest on February-05-2021

Code answers related to "if radio button checked c#"

Browse Popular Code Answers by Language