如何正确显示RadioButtonList控件的选项
my3b 2003-10-25 05:54:57 <asp:RadioButtonList id="gushed" Runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="是" Selected="True">是</asp:ListItem>
<asp:ListItem Value="否">否</asp:ListItem></asp:RadioButtonList>
上面的RadioButtonList控件默认选择了"是"这个选项,提交到数据库中后,现在碰到了个显示的问题。我的显示代码如下:
<asp:RadioButtonList id="gushed" Runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="是" Selected="True">是</asp:ListItem>
<asp:ListItem Vllue="否">否</asp:ListItem>
</asp:RadioButtonList>
但显示时却是这样:假如我在提交时选择了"否"这个选项,那显示则变成了否 否 这样的形式,这样显示不对呀,在asp中我是这样写的:
<input type="radio" name="T10" value="是" <%if rs("fjm") ="是" then Response.Write "checked"%>>
是
<input name="T10" type="radio" value="否" <%if rs("fjm") ="否" then Response.Write "checked"%>>
否
显示无误,我希望能在asp.net中也能同样显示数据库中的数据并且显示的格式也是是 否 这样的格式,就是说也如同提交页面那样有选择状态,这样才能让会员便于更改,希望大家帮帮我,谢谢了!