如何让收音机“复选框”看起来像一个真正的ASP按钮?

时间:2014-03-05 14:27:18

标签: asp.net button radio

我是ASP编程和Web开发的新手。

我在一个新项目上使用Twitter Bootstrap 3。

使用上面的html代码:

                    <div class="btn-group btn-group-justified" data-toggle="buttons">
                        <label class="btn btn-default active">
                            <input type="radio" name="options" id="option1">
                            <i class="fa fa-user"></i>.Para mim
                        </label>
                        <label class="btn btn-default">
                            <input type="radio" name="options" id="option2" onclick="paraEmpresa()">
                            <i class="fa fa-briefcase"></i>.Para minha empresa
                        </label>
                    </div>

我有两个按钮可以像收音机一样工作:

enter image description here

问题是:如何使用ASP.net元素进行相同的操作?

注意:我不知道进行正确搜索的条款。 RADIO BUTTONS是圆形的,但我无法确定如何调用单选按钮REAL按钮。感谢帮助。

1 个答案:

答案 0 :(得分:1)

我认为这就是你需要的

              <div class="btn-group btn-group-justified" data-toggle="buttons">
                    <label class="btn btn-default active">
                        <asp:RadioButton id="option1" runat="server" GroupName="options"></asp:RadioButton>
                        <i class="fa fa-user"></i>.Para mim
                    </label>
                    <label class="btn btn-default">
                        <asp:RadioButton id="option2" runat="server" GroupName="options" ></asp:RadioButton>
                        <i class="fa fa-briefcase"></i>.Para minha empresa
                    </label>
                </div>