比如两个radio A,B
A:大学
B:高中我选中A时,在后台取到消息“大学”,
选B时,得到“高中”
用C#如何实现哦,谢谢高人指点

解决方案 »

  1.   


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

  2.   

    private void radioButton1_CheckedChanged(object sender, EventArgs e) 
            { 
    if(radioButton1.checked == true)
    string value=radioButton1.Text;         }
      

  3.   

    private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
    {
    string value=this.radioButton1.Text .ToString ();
    }
      

  4.   

                    foreach (Control mycontrol in this.Controls)
                    {
                        if (mycontrol.GetType() == typeof(RadioButton))
                        {
                            RadioButton myradio = mycontrol as RadioButton;                        
                            if (myradio.Checked == true)
                            {
                                string textname = myradio.Text;
                                break;
                            }
                        }
                    }