ASP.NET Repeater, Dynamically starting new table row

Posted by dherrin79 on Stack Overflow See other posts from Stack Overflow or by dherrin79
Published on 2012-09-07T15:09:11Z Indexed on 2012/09/07 15:38 UTC
Read the original article Hit count: 299

Filed under:
|
|

I have the following repeater:

<table>
        <asp:Repeater runat="server" ID="rptBrandRepeater">
            <ItemTemplate>
                <tr>
                    <td>
                        <asp:HyperLink runat="server" ID="lnkCompanyLink">
                            <asp:Image runat="server" ID="imgCompanyLogo" />
                        </asp:HyperLink>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
</table>

I want to start a new row every four table cells.

I don't want to used jQuery or Javascript to accomplish this.

The outputted html is supposed to look like this page: http://rmtequipment.com/golfandturf.aspx

I have made an interface that will allow them to add these logos on their own. So this page will be dynamically built.

What is the best way to accomplish this goal?

If a listview or gridview is a better approach I am open to that as well.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about repeater