如何使用Repeater布局

来源:百度知道 编辑:UC知道 时间:2024/06/05 20:04:47
如何使用Repeater实现类似下面的布局显示:

姓名-年龄 | 姓名-年龄 | 姓名-年龄
姓名-年龄 | 姓名-年龄 | 姓名-年龄
姓名-年龄 | 姓名-年龄 | 姓名-年龄

就用Repeater显示, 还有如何在列与列之间加根竖线呢
请教各位

<style type="text/css">
.list
{
width: 600px;
list-style-type: none;
}
.list li
{
float: left;
width: 100px;
height: 100px;
background-color: Silver;
margin: 5px;
}
</style>

<div>
<ul class="list">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<li>
<div>
<%=GetIndex()%>
</div>
<%#Eval("A")%>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div