日期:2014-05-17  浏览次数:20418 次

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