productlist.ascx

来自「这是一个基于asp.net的网上气球店」· ASCX 代码 · 共 36 行

ASCX
36
字号
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductList.ascx.cs" Inherits="UserControl_ProductList" %>
<asp:Label ID="PagingLabel" runat="server" CssClass="PagingText" Visible="false">
</asp:Label>
&nbsp;&nbsp;
<asp:HyperLink ID="previousLink" runat="server" CssClass="PagingText" Visible="false">Previous</asp:HyperLink>
&nbsp;&nbsp;
<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 + =
减小字号Ctrl + -
显示快捷键?