【问题标题】:Bootstrap is disturbing my Table style when i use repeater当我使用中继器时,Bootstrap 干扰了我的表格样式
【发布时间】:2016-04-26 12:55:04
【问题描述】:

我有这段代码,我想按顺序组织它,但引导程序扰乱了设计

<div class="col-lg-12 col-md-12 col-sm-12 row">
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
    <ItemTemplate>
            <div class="col-md-4">
                <div class="panel panel-danger">
                    <div class="panel-heading">
                        <asp:Label ID="lblCategoryId" runat="server" Text='<%#Eval("CategoryId") %>' Visible="false"> </asp:Label>
                        <img class="img-responsive" src="../images/<%#Eval("imgSrc")%>" /><h5 class="text-center" />
                        <%#Eval("Category") %> </h5>
                    </div>
                    <ul class="list-group list-group-flush text-center">
                        <asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource2">
                            <ItemTemplate>
                                <a>
                                    <li id="liProdView" class="list-group-item">
                                        <asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl='<%#Eval("SubCategoryId","CustomerDetails.aspx?SubCategoryId={0}") %>'>
                                        <%#Eval("SubCategory") %>  ( <%#Eval("CompanyCount") %>)
                                        </asp:LinkButton>
                                    </li>
                                </a>
                            </ItemTemplate>
                        </asp:Repeater>
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ServiceConnectionString %>"
                            SelectCommand="SELECT count(*) AS CompanyCount,dbo.tblCompanySubCategory.SubCategoryId, dbo.tblCompanySubCategory.SubCategory, 
                 dbo.tblCompanySubCategory.CategoryId  FROM dbo.tblCompany INNER JOIN dbo.tblCompanySubCategory ON 
                 dbo.tblCompany.SubCategoryId = dbo.tblCompanySubCategory.SubCategoryId
                 WHERE  (dbo.tblCompanySubCategory.CategoryId = @CategoryId)
                 GROUP BY dbo.tblCompanySubCategory.SubCategoryId, dbo.tblCompanySubCategory.SubCategory, dbo.tblCompanySubCategory.CategoryId">
                            <SelectParameters>
                                <asp:ControlParameter Name="CategoryId" ControlID="lblCategoryId" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </ul>
                    <div class="panel-footer"><a class="btn btn-lg btn-block btn-primary" href="#">See more</a> </div>
                </div>
            </div>
    </ItemTemplate>
</asp:Repeater>
    </div>

enter image description here 这是我的输出(屏幕截图),我想在行中对其进行样式设置,以便当一行完成时,下一个表必须按顺序放置在新行中

【问题讨论】:

  • 谢谢...
    将它放在 之前 ---我已经通过限制转发器解决了我的问题,现在它可以正常工作了

标签: css asp.net twitter-bootstrap


【解决方案1】:
<div class="clearfix"></div>

&lt;/ItemTemplate&gt; 之前添加上面的代码应该可以解决问题。

【讨论】:

  • 试着把它放在
  • -- - 谢谢我通过限制转发器解决了我的问题,现在它是按顺序排列的
猜你喜欢
  • 1970-01-01
  • 2021-02-20
  • 1970-01-01
  • 2017-04-17
  • 2020-07-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多