简体   繁体   English

ASP - 验证单选按钮

[英]ASP - Validation RadioButton

I have two System.Web.UI.WebControls radioButton --> "Yes" and "No".我有两个 System.Web.UI.WebControls radioButton -->“是”和“否”。

  • When I checked RButton "Yes" -> RButton "No" is Disable.当我检查 RButton 时“是”-> RButton“否”被禁用。
  • When I unchecked RButton "Yes" -> RButton "No" is Enable.当我取消选中 RButton "Yes" -> RButton "No" 时启用。

  • When I checked RButton "No" -> RButton "Yes" is Disable.当我检查 RButton "No" -> RButton "Yes" 时禁用。
  • When I unchecked RButton "No" -> RButton "Yes" is Enable.当我取消选中 RButton "No" -> RButton "Yes" 时启用。

在此处输入图片说明

Need BACK END LOGIC Like this:需要后端逻辑像这样:

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

Thank you previously!先谢谢了!

Why use 2 different Radio Buttons ..??为什么使用 2 个不同的单选按钮 ..?? you can use RadioButtonList你可以使用RadioButtonList

Here is link 是链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM