求专家,DataList嵌套Repeater,包含的个数不等,不想要每行等高,去掉空白
目前效果,不想数目不同时,行行中间留下空白
想要的效果,紧凑一些
代码如下:
<asp:DataList id="BigCategories" runat="server" RepeatColumns="5" ItemStyle-VerticalAlign="Top" RepeatLayout="Table" RepeatDirection="Vertical" OnItemDataBound="BigCategories_ItemDataBound"> <ItemTemplate> <!--分类名称--> <a class="newstitle" href='CatalogInfoList.aspx?catalogtop=<%# HttpUtility.UrlEncode(Eval("catalogtop").ToString()) %>' target="_blank"><%# Eval("catalogtop") %></a> <!--分类下的产品--> <asp:Repeater ID="MinCategories" runat="server"> <ItemTemplate> <a href='CatalogInfoList.aspx?catalogsub=<%# HttpUtility.UrlEncode(Eval("catalogsub").ToString()) %>' target="_blank"><%# Eval("catalogsub") %></a> </ItemTemplate> </asp:Repeater> </ItemTemplate> </asp:DataList>