📄 productlist.ascx
字号:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductList.ascx.cs" Inherits="UserControl_ProductList" %>
<asp:Label ID="PagingLabel" runat="server" CssClass="PagingText" Visible="false">
</asp:Label>
<asp:HyperLink ID="previousLink" runat="server" CssClass="PagingText" Visible="false">Previous</asp:HyperLink>
<asp:HyperLink ID="nextLink" runat="server" CssClass="PagingText" Visible="false">Next</asp:HyperLink>
<asp:DataList ID="list" runat="server" RepeatColumns="2" RepeatDirection="Horizontal" OnItemCommand="list_ItemCommand">
<ItemTemplate>
<table cellpadding="0" align="center">
<tr height="105">
<td align="center" width="110">
<a href='Product.aspx?ProductID=<%# Eval("ProductID") %>'>
<img width="100" src='ProductImages/<%# Eval("Image1FileName") %>' alt="" border="0" />
</a>
</td>
<td valign="top" width="250">
<a class="ProductName" href='Product.aspx?ProductID=<%# Eval("ProductID") %>'>
<%# Eval("Name") %>
</a>
<br />
<span class="ProductDescription"><%# Eval("Description") %>
<br /><br />
Price:
</span>
<span class="ProductPrice"><%# Eval("Price","{0:c}") %></span>
<br />
<asp:Button ID="addToCartButton" runat="server" Text="Add to Cart"
CommandArgument='<%# Eval("ProductID") %>'
CssClass="SmalButtonText"/>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -