Repeater支持多行多列显示
.aspx
<asp:Repeater runat="server" id="repeater1" OnItemDataBound="Repeater1_ItemDataBound">
<HeaderTemplate>
<table width="100%" border=0 align="center"><tr>
</HeaderTemplate>
<ItemTemplate>
<td><%#Eval("数据")%></td>
</ItemTemplate>
<FooterTemplate>
</tr></table>
</FooterTemplate>
</asp:Repeater>
.aspx.cs
protected int i=1; //全局变量
protected void Repeater1_ItemDataBound(object src,RepeaterItemEventArgs e)
{
if(i%3==0)
{
e.Item.Controls.Add(new LiteralControl("</tr><tr>"));
}
i++;
}