如何获得单选按钮值 [英] how to get radio button value
本文介绍了如何获得单选按钮值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我们想获得文本框值意味着我们可以像这样写:textboxobject.text = textbox1.text
像这样,如果我们想获得单选按钮选择值意味着我怎么写我试过这个:radiobottonobject.Text = radiobutton.selectedvalue;但没有工作。我想做什么
解决方案
SelectedValue不是RadioButton属性:尝试检查。
检查文档:
System.Windows.Controls.RadioButton类 [ ^ ]
System.Web.UI.WebControls.RadioButton Class [ ^ ]
选中或不选中单选按钮的值
hi,
if we want to get textbox value means we can write like this : textboxobject.text=textbox1.text
like this if we want to get radio button selected value means how can i write i tried this: radiobottonobject.Text=radiobutton.selectedvalue; but not working. what i want to do解决方案SelectedValue is not a RadioButton property: try Checked instead.
Check the documentation:
System.Windows.Controls.RadioButton Class[^]
System.Web.UI.WebControls.RadioButton Class[^]
the value of a radio button is either checked or not checked
这篇关于如何获得单选按钮值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文