本文介绍了怀疑使用单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
帮助我在单选按钮列表中工作....
help me to work in radiobuttonlist....
推荐答案
<asp:radiobuttonlist id="RadioButtonList1" runat="server" xmlns:asp="#unknown">
<asp:listitem text="Male" value="Male" selected="True"></asp:listitem>
<asp:listitem text="Female" value="female"></asp:listitem>
</asp:radiobuttonlist>
上面的代码是rblist示例,向像Male和Female这样的用户显示选项.
如果用户选择女性,则默认情况下将选择男性,然后禁用男性选项.
您也可以从数据库将数据绑定到RBList.
您可以将服务器事件设置为此控件,例如selectedindexchanged与下拉列表控件相同.
这是关于RadioButtonList控件.
希望您能理解我的意思.
In the above code is sample rblist to show options to user like Male and Female.
by default male is selected if user select female thn the male option''ll be disabled.
You can bind data to RBList from database also.
You can set server event to this control like selectedindexchanged same as for dropdownlist control.
this is about RadioButtonList control .
I hope you are understood what I said.
这篇关于怀疑使用单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!