读书人

RadioButtonList,该怎么解决

发布时间: 2013-03-19 17:22:05 作者: rapoo

RadioButtonList


<asp:RadioButtonList ID="RadioButtonList1" runat="server">
</asp:RadioButtonList>
<asp:RadioButton ID="RadioButton1" runat="server" />

一个RadioButtonList,一个RadioButton
RadioButtonList绑定数据库数据,RadioButton是一个固定的值
RadioButtonList绑定的时候,根据字段判断让其中一个值默认选中,不符合条件都不选中
如果RadioButtonList其中一个是选中的,RadioButton不选中,如果RadioButton是选中的,RadioButtonList不选中

应该怎么写



[解决办法]
你就根据数据自己判断设置RadioButtonList的SelectedIndex和RadioButton的Checked属性就行了。
[解决办法]
循环,满足条件就设置Checked=true就可以了。
[解决办法]
自己都说的很清楚啦。
[解决办法]
引用:
循环,满足条件就设置Checked=true就可以了。


+10086

读书人网 >asp.net

热点推荐