repeter 横排显示 (如: 人事部,行政部,IT部....)每行8个自动换行如何实现哦

解决方案 »

  1.   

    <asp:Repeater id="cdcatalog" runat="server"><HeaderTemplate>
    <table border="1" width="100%">
    <tr>
    <th>Title</th>
    <th>Artist</th>
    <th>Country</th>
    <th>Company</th>
    <th>Price</th>
    <th>Year</th>
    </tr>
    </HeaderTemplate><ItemTemplate>
    <tr>
    <td><%#Container.DataItem("title")%></td>
    <td><%#Container.DataItem("artist")%></td>
    <td><%#Container.DataItem("country")%></td>
    <td><%#Container.DataItem("company")%></td>
    <td><%#Container.DataItem("price")%></td>
    <td><%#Container.DataItem("year")%></td>
    </tr>
    </ItemTemplate><AlternatingItemTemplate>
    <tr bgcolor="#e8e8e8"><td><%#Container.DataItem("title")%></td>
    <td><%#Container.DataItem("artist")%></td>
    <td><%#Container.DataItem("country")%></td>
    <td><%#Container.DataItem("company")%></td>
    <td><%#Container.DataItem("price")%></td>
    <td><%#Container.DataItem("year")%></td>
    </tr>
    </AlternatingItemTemplate><FooterTemplate>
    </table>
    </FooterTemplate></asp:Repeater>
      

  2.   

    不好意思可能是没说清楚,
     <asp:Repeater ID="rpstyle" runat="server" onItemCommand="rpstyle_ItemCommand">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="btnLinke" runat="server" CommandName="Type" CommandArgument='<%# Eval("TypeName") %>' Text='<%#Eval("TypeName")%>'></asp:LinkButton>
                                              </ItemTemplate>
                                                </asp:Repeater>
    我要让他每行显示8个该怎么做
      

  3.   

    8个一行的话,要判断一下,参考我之前写的:
    http://blog.csdn.net/taomanman/archive/2010/09/27/5910199.aspx
      

  4.   

    设置标签宽度,如:设置ul宽度为最多能放8个li宽度之和即可。或者采用datalist
      

  5.   

    分个页就可以了 设置pageindex=8分页