RadioButtonList在ASP.NET中显示

时间:2014-02-25 06:19:59

标签: asp.net radiobuttonlist

我有以下radiobuttonlist

    <asp:RadioButtonList ID="rbl_payment_type" runat="server" AutoPostBack="true" OnSelectedIndexChanged="rbl_payment_type_SelectedIndexChanged">
   <asp:ListItem Value="0">Cheque</asp:ListItem>
   <asp:ListItem Value="1">Cash</asp:ListItem>
</asp:RadioButtonList>

显示屏将选项显示在另一个下方。

如何在一行中显示所有选项?

1 个答案:

答案 0 :(得分:1)

使用属性RepeatDirection

<asp:RadioButtonList ID="rbl_payment_type" runat="server" AutoPostBack="true" RepeatDirection = "Horizontal" OnSelectedIndexChanged="rbl_payment_type_SelectedIndexChanged">