如何获得复选框值是真的? [英] How to get checkbox value is true?
本文介绍了如何获得复选框值是真的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在数据库中保存了该复选框值(如是/否)。我想在gridview中附加该值。如果该数据库中的复选框值为yes我想要显示其他未经检查的复选框。
谢谢和问候
Hari
解决方案
将Checkbox值保存在数据库中为Boolean或YES / NO
复选框应该在绑定后将其取出
< blockquote> http://social.msdn.microsoft.com/论坛/ en / csharpgeneral / thread / 8e9d4d04-1585-4565-8fde-bc3943b06533 [ ^ ]
选中复选框checkbox1:
checkbox1.checked = true
取消选中ch eckbox checkbox1:
checkbox1.checked = false
Hi All,
Iam saving that checkbox value(like yes/no)in database.I want to append that value in gridview.If that checkbox value is yes in that database i want to show that checkbox is checked other wise unchecked.
Thanks& Regards
Hari
解决方案
Save the Checkbox value in the database as Boolean or YES/NO
the checkbox should pick it up once you bind it
http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/8e9d4d04-1585-4565-8fde-bc3943b06533[^]
To check the checkbox checkbox1:
checkbox1.checked = true
To uncheck the checkbox checkbox1:
checkbox1.checked = false
这篇关于如何获得复选框值是真的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文