如何从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>
和它下面的行应该是
<div class="row">
<div class="col-sm-4">
Radio3
</div>
<div class="col-sm-4">
Radio4
</div>
<div class="col-sm-4">
Radio5
</div>
RadioButtonList
<asp:RadioButtonList ID="rblbase" runat="server"></asp:RadioButtonList>
答案 0 :(得分:0)
使用 RepeatDirection =水平并在 CSS 中设置 margin-left,right 。例如,
<asp:RadioButtonList ID="rblbase" runat="server"
RepeatDirection="Horizontal" CssClass="myRadioBtn"></asp:RadioButtonList>
然后在你的css代码中,
.myRadioBtn input[type="radio"]
{
margin-left: 15px;
margin-right: 15px;
}
Orelse你可以使用CellPadding和CellSpacing,比如bellow,
<asp:RadioButtonList ID="rblbase" runat="server"
RepeatDirection="Horizontal" CellPadding="2" CellSpacing="2">
</asp:RadioButtonList> //change the values
希望有所帮助:)