当asp.net C#中继器结合HTML表格布局 [英] Html table layout when binding with asp.net c# repeater
本文介绍了当asp.net C#中继器结合HTML表格布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有ASP中继器看起来像这样
I have asp repeater which looks like this
<asp:Repeater runat="server" ID="Repeater1">
<HeaderTemplate>
<table border="1">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<%# Eval("Username")%>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
我怎样才能让表的布局也是这样吗?
How i can make table layout like this?
感谢
推荐答案
尝试列表视图
<一个href=\"http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx\" rel=\"nofollow\">http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx
<asp:ListView ID="ContactsListView"
DataSourceID="ContactsDataSource"
GroupItemCount="2"
runat="server">
<ItemTemplate>
<%# Eval("Username")%>
</ItemTemplate>
</asp:ListView>
这篇关于当asp.net C#中继器结合HTML表格布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文