Html Asp单选按钮列出一行中的每三个单选按钮bootstrab

Html Asp单选按钮列出一行中的每三个单选按钮bootstrab,html,asp.net,twitter-bootstrap,css,Html,Asp.net,Twitter Bootstrap,Css,如何从asp:RadioButtonListrblbase一行中获取每3个单选按钮,如下面的代码所示 <div class="row"> <div class="col-sm-4"> Radio1 </div> <div class="col-sm-4"> Radio2 </div> <div class="col-sm-4"> Radio3 </div> 无线电1 无线电2 无线电

如何从asp:RadioButtonList
rblbase
一行中获取每3个单选按钮,如下面的代码所示

<div class="row">
<div class="col-sm-4">
    Radio1
</div>
<div class="col-sm-4">
    Radio2
</div>

<div class="col-sm-4">
    Radio3
</div>

无线电1
无线电2
无线电3

下面的一行应该是

<div class="row">
<div class="col-sm-4">
    Radio3
</div>
<div class="col-sm-4">
    Radio4
</div>

<div class="col-sm-4">
    Radio5
</div>

无线电3
无线电4
无线电5

RadioButtonList

<asp:RadioButtonList ID="rblbase" runat="server"></asp:RadioButtonList>

使用RepeatDirection=Horizontal并在CSS中设置左右边距。比如说,

<asp:RadioButtonList ID="rblbase" runat="server" 
RepeatDirection="Horizontal" CssClass="myRadioBtn"></asp:RadioButtonList>
或者你可以使用单元格填充和单元格间距,如下面的

<asp:RadioButtonList ID="rblbase" runat="server" 
RepeatDirection="Horizontal" CellPadding="2" CellSpacing="2">
</asp:RadioButtonList> //change the values

//更改值

希望有帮助:)

使用RepeatDirection=Horizontal并在CSS中设置左右边距。比如说,

<asp:RadioButtonList ID="rblbase" runat="server" 
RepeatDirection="Horizontal" CssClass="myRadioBtn"></asp:RadioButtonList>
或者你可以使用单元格填充和单元格间距,如下面的

<asp:RadioButtonList ID="rblbase" runat="server" 
RepeatDirection="Horizontal" CellPadding="2" CellSpacing="2">
</asp:RadioButtonList> //change the values

//更改值
希望有帮助:)

set
RepeatDirection=“Horizontal”
set
RepeatDirection=“Horizontal”