首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

RadioButtonList,该怎么解决

2013-03-19 
RadioButtonListasp:RadioButtonList IDRadioButtonList1 runatserver/asp:RadioButtonListasp

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

热点排行