日期:2014-05-19  浏览次数:20392 次

ASP.NET2.0中有没有可分页又可以多列显示的控件?
我想做一个成可以同时显示多列多行   每个小板块显示一些图片   图片过多的时候可以分页   谢谢

------解决方案--------------------
DataList 控件可以实现,不过分页要自已写

参考如下:
------------------------------前台:-------------------------------


<asp:DataList ID= "DataList1 " runat= "server " RepeatColumns= "2 " OnItemCommand= "DataList1_ItemCommand "
Width= "550px " OnItemDataBound= "DataList1_ItemDataBound ">
<ItemTemplate>
<table id= "tbl_container " runat= "server " border= "0 " align= "center " width= "280 " height= "170 ">
<tr>
<td align= "right " style= "width: 278px " colspan= "2 ">
<asp:Label ID= "LblCardName " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "CardName ") %> '
Font-Bold= "True "> </asp:Label> &nbsp;&nbsp;&nbsp;&nbsp; </td>
</tr>
<tr>
<td style= "width: 278px " colspan= "2 ">
<asp:Label ID= "LblType " runat= "server " Visible= "false " Text= ' <%#Convert.ToInt32(DataBinder.Eval(Container.DataItem, "CardType ")).ToString() %> '> </asp:Label>
</td>
</tr>
<tr>
<td width= "35% " valign= "bottom ">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;面值: <asp:Label CssClass= "DeleteLine " ID= "Label2 "
runat= "server " Text= ' <%# Convert.ToInt32(DataBinder.Eval(Container.DataItem, "CardPrice ")).ToString()%> '> </asp:Label> 元
</td>
<td valign= "bottom " align= "left ">
销售价格: <asp:Label ID= "LblFactPrice " runat= "server " Text= ' <%# Convert.ToInt32(DataBinder.Eval(Container.DataItem, "CardFactPrice ")).ToString() %> '> </asp:Label> 元 </td>
</tr>
<tr>
<td colspan= "2 ">
&nbsp;&nbsp;使用期: <asp:Label ID= "Label4 " runat= "server " Text= ' <%# DataBinder.Eval(Container.DataItem, "CardDayAmount ") %> '> </asp:Label> 天
</td>
</tr>
<tr>
<td style= "width: 278px " align= "right " colspan= "2 ">
<asp:LinkButton CssClass= "origA " ID= "ButtonPopedom " CommandArgument= ' <%# DataBinder.Eval(Container.DataItem, &qu