Hello
Here is how you can do it with a repeater
<asp:Repeater runat="server" id="myRep">
<itemtemplate>
<li>
<a href='customer_info.aspx?Id=<%# DataBinder.Eval(Container.DataItem,
"AID")%>'>
<%# DataBinder.Eval(Container.DataItem, "AID")%>
</a>
</li>
<asp:placeholder runat="server" visible="<%# Container.ItemIndex % 10 ==
9%>">
</td><td valign="top">
</asp:placeholder>
</itemtemplate>
</asp:repeater>
You may also want to look at DataList, it can't do what you want, but it is
close. If you still want to user string concatenation, then use
StringBuilder, which would have a better performance.
Best regards,
Sherif
"Justin Jolley" <am*******@yahoo.com> wrote in message
news:uv*************@TK2MSFTNGP11.phx.gbl...
I ended up using the code below.
I looked at the repeater, but didn't see how it would give me the
flexability I wanted (to list 10 items in each cell).
int i = 0;
while (objDataReader.Read() == true)
{
strResultsHolder += "<li><a href='customer_info.aspx?ID=";
strResultsHolder += objDataReader["AID"];
strResultsHolder += "'>";
strResultsHolder += objDataReader["Customer_Name"];
strResultsHolder += "</a></li>";
if ( i % 10 == 9 )
{
strResultsHolder += "</td><td valign=top>";
}
i++;
}
Thanks,
Justin
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!