我如何取消选中复选框C#.NET [英] how can i uncheck checkbox C#.NET

查看:130
本文介绍了我如何取消选中复选框C#.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的.
我的表格中有2个复选框.我想如果用户选中了checkbox1,则checkbox2被取消选中,如果用户选中了checkbox2,则checkbox1被取消选中.已检查) CheckBox2.Checked = false ; 如果(CheckBox2.Checked) CheckBox1.Checked = false ;


您也可以使用 RadioButtonList


Hi dears.
I have 2 checkbox in my form. I want if user checked checkbox1 the checkbox2 be uncheck,and if user checked checkbox2 the checkbox1 be unchecked.

解决方案

If (CheckBox1.Checked)
CheckBox2.Checked=false;
if (CheckBox2.Checked)
CheckBox1.Checked=false;


hi, you can also use the RadioButtonList


这篇关于我如何取消选中复选框C#.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆