如我有一个商品对比的要绑定数据数据表如下
ID Name Price
1 小王 1000
2 小张 1200
3 小李 1300然后要绑定到repeater中如下
ID 1 2 3
Name 小王 小张 小李
Price 1000 1200 1300谢谢
我现在是 用循环的方法将数据填充到别一个DataTable上再绑定用什么方法效率最好谢谢
ID Name Price
1 小王 1000
2 小张 1200
3 小李 1300然后要绑定到repeater中如下
ID 1 2 3
Name 小王 小张 小李
Price 1000 1200 1300谢谢
我现在是 用循环的方法将数据填充到别一个DataTable上再绑定用什么方法效率最好谢谢
<ItemTemplate>
<table width="100%" border="0" style="text-align: left; line-height: 20px;" cellspacing="0"
cellpadding="0">
<tr>
<td width="25%">
<a href="/BusinessOpp/opplist.aspx?typeid=<%# Eval("ID")%>" >
<%#Eval("TypeName") %>
</a>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>yong repeater 也可以,循环tr 就行
<ItemTemplate>
<%#Eval("ID") %><br />
<%#Eval("name") %>
<br />
<%#Eval("price") %>
</ItemTemplate>
</asp:DataList>
RE:
http://pdlib.pconline.com.cn/product/compare.do?method=compare&id=227897&id=242622
如果用上面的各位的方法绑定出来的东西是很不美观的