Sunday, February 23, 2014

Clicking different radio buttons that will send to text box

Hello Friend.


Here is your solution


STEP 1. Make a form like this.



STEP 2 Write a Code like this



public partial class Form1 : Form
{
string radioValue = null;
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(radioValue + " is Selected");
}

private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
radioValue = radioButton1.Text;
}

private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
radioValue = radioButton2.Text;
}


}





Thanks Best Regards


YASIR AMEEN


Please Mark as an Answer if its is helpful


No comments:

Post a Comment