【问题标题】:Making asp:CheckBoxList Items Side By Side制作 asp:CheckBoxList Items Side By Side
【发布时间】:2016-10-25 07:38:05
【问题描述】:

我有一个问题,我在网上找不到解决方案。我正在使用 asp CheckBoxList,但我有太多数据要列出。我想在框区域的 2 列中列出项目。我分享一张图。请检查一下。那么我该怎么做呢?

重要的是;这个复选框列表从后面的代码动态填充。我在 html 页面上没有 ListItem。所以我不能给它们设计样式。有什么想法吗?

<asp:CheckBoxList ID="AreaCheckBoxes" runat=server>

</asp:CheckBoxList>

【问题讨论】:

    标签: c# asp.net checkboxlist


    【解决方案1】:

    您可以将RepeatColumns 属性设置为2,将RepeatLayout 属性设置为Table

    <asp:CheckBoxList ID="AreaCheckBoxes" 
                      RepeatColumns="2" 
                      RepeatLayout="Table" 
                      RepeatDirection="Vertical"
                      runat=server>
    </asp:CheckBoxList>
    

    【讨论】:

    • 这就是我想要的。谢谢!
    猜你喜欢
    • 2022-12-02
    • 1970-01-01
    • 2010-11-27
    • 2010-09-11
    • 1970-01-01
    • 2020-03-23
    • 2013-09-15
    • 2016-08-30
    相关资源
    最近更新 更多