你的要求不清楚。但据我了解,我认为您想动态生成产品列表或类似的东西..所以你用做它...我会放一个示例代码..参考它..
<div class="scrollContainer">
<ul>
<asp:Repeater ID="list" runat="server" EnableViewState="false">
<ItemTemplate>
<li style="margin-bottom: 50px;width:100px;list-style:none;">
<span class="bold">
<a href='<%# Link.ToProduct(Eval("ItemID").ToString()) %>'>
<%# HttpUtility.HtmlEncode(Eval("ItemName").ToString()) %>
</a>
</span>
<asp:HyperLink runat="server" ID="productLink"
NavigateUrl='<%# Link.ToProduct(Eval("ItemId").ToString()) %>'
CssClass='thumb'
>
<img src='<%# Link.ToProductImages(Eval("Image").ToString()) %>'
alt='<%# HttpUtility.HtmlEncode(Eval("ItemName").ToString()) %>'
class="thumb" width="100px" height="100px"/>
</asp:HyperLink>
<p class="bold colr">
<%# Eval("price", "{0:c}") %>
</p>
<p style="text-align:center; height: 50px;">
<%# HttpUtility.HtmlEncode(Eval("ShortDescription")) %>
<a href="<%# Link.ToProduct(Eval("ItemId").ToString()) %>">more</a>
</p>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>