repeater每行显示固定的的行数

来源:互联网 发布:淘宝店铺售假扣分影响 编辑:程序博客网 时间:2024/06/08 06:34

repeater每行显示5个数据   
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="kuang" style="margin-top: 2px">
        <tr>
            <asp:Repeater runat="server" ID="rptList">
                <ItemTemplate>
                <asp:Literal runat="server" ID="CompanyIDhidden" Text='<%#((DataRowView)Container.DataItem)["ID"]%>' Visible="false"></asp:Literal>
                    <td class="zhonghui" onmouseover="mouseovertr(this)" onmouseout="mouseouttr(this)" width="20%" title="<%#((DataRowView)Container.DataItem)["Name"]%>">
                        <input type="radio" name="CompanyId" id="CompanyId_<%#((DataRowView)Container.DataItem)["ID"]%>" value="<%#((DataRowView)Container.DataItem)["ID"]%>">
                        <asp:Label runat="server" ID="CompanyIdName" runat="server" ForeColor="Black"></asp:Label>
                    </td>
                    <%# ((Container.ItemIndex + 1)%5==0 && Container.ItemIndex+1!=100)? "</tr><tr>":""%>
                </ItemTemplate>
            </asp:Repeater>
        </tr>
    </table>

原创粉丝点击