如何处理单选按钮? [英] How to handle radio buttons?
本文介绍了如何处理单选按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在检查单选按钮时,我无法只检查一个单选按钮..所有单选按钮均匀检查..
解决方案
希望这会有所帮助。
如何分组RadioButtons [ ^ ] < br $> b $ b
http://asp-net-example.blogspot.in/2008/10/radiobuttonlist-example-how-to-use.html [ ^ ]
http://www.csharpkey.com/aspnet/controls/radiobutton.htm [ ^ ]
< asp:radiobuttonlist id < span class =code-keyword> = RadioButtonList1 runat = server xmlns:asp = #未知 >
< asp:listitem > 一个
< asp:listitem > 两个
< asp:listitem > 三个
string val = RadioButtonList1.SelectedItem.Text
或
int val = Convert.ToInt32(RadioButtonList1.SelectedValue.Tostring());
While checking the radio buttons, I didn't able to check only one radio button.. all radio buttons checked evenly..
解决方案
Hope this will help.
How to group RadioButtons[^]
http://asp-net-example.blogspot.in/2008/10/radiobuttonlist-example-how-to-use.html[^]
http://www.csharpkey.com/aspnet/controls/radiobutton.htm[^]
<asp:radiobuttonlist id="RadioButtonList1" runat="server" xmlns:asp="#unknown"> <asp:listitem>one <asp:listitem>two <asp:listitem>three string val=RadioButtonList1.SelectedItem.Text or int val=Convert.ToInt32(RadioButtonList1.SelectedValue.Tostring());
这篇关于如何处理单选按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文