I have a list that contains names.
I would like to create a listview that will display these name, three to a row.
I am unsure how to accomplish this.
I have a list that contains names.
I would like to create a listview that will display these name, three to a row.
I am unsure how to accomplish this.
You should use a GroupTemplate. Here's an example from 4GuysFromRolla.com
<asp:ListView ID="ProductList1" runat="server"
DataSourceID="ProductDataSource"
GroupItemCount="3" ItemPlaceholderID="itemsGoHere"
GroupPlaceholderID="groupsGoHere">
<LayoutTemplate>
<p>
<asp:PlaceHolder runat="server" ID="groupsGoHere"></asp:PlaceHolder>
</p>
</LayoutTemplate>
<GroupTemplate>
<ol>
<asp:PlaceHolder runat="server" ID="itemsGoHere"></asp:PlaceHolder>
</ol>
</GroupTemplate>
<ItemTemplate>
<li><%#Eval("ProductName")%></li>
</ItemTemplate>
</asp:ListView>