How to get value of Radio Buttons?

后端 未结 7 1295
自闭症患者
自闭症患者 2020-12-30 05:05

I have a group box contains radio buttons eg.

o Male

o Female

i want my code to get the sel

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 05:56

    You need to check one if you have two

    if(rbMale.Checked)
    {
    
    }
    else
    {
    
    }
    

    You need to check all the checkboxes if more then two

    if(rb1.Checked)
    {
    
    }
    else if(rb2.Checked)
    {
    
    }
    else if(rb3.Checked)
    {
    
    }
    

提交回复
热议问题