catalog.aspx

来自「一个网上购物系统」· ASPX 代码 · 共 47 行

ASPX
47
字号
<%@ Page Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true" CodeFile="Catalog.aspx.cs" Inherits="Catalog" Title="Product Catalog"%>
<%@ Register TagPrefix="uc1" TagName="CatalogList" Src="Modules/CatalogList.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1><asp:Label ID="lblTitle" runat="server" Text="Label"></asp:Label></h1>
    
    <asp:DataList ID="DataList1" Runat="server" DataKeyField="ProductID" DataSourceID="ObjectDataSource1">
            <ItemTemplate>
                <table>
                    <tr>
                        <td>
                            <a href="product.aspx?id=<%# Eval("ProductID") %>" >
                                <img alt='Product Image - <%# Eval("Description") %>' src='images/productimages/<%#  Eval("ProductImage") %>' class="thumbimage">
                            </a>
                        </td>
                        <td>
                            <div class="plainbox">
		                        <a href="product.aspx?id=<%# Eval("ProductID") %>">
    		                
			                    [<%# Eval("ModelNumber") %>]
			                    <a href="product.aspx?id=<%# Eval("ProductID") %>"><%# Eval("ModelName") %></a>&nbsp; 
			                    </A>
			                    <%# GetPrice(Eval("UnitCost"),Eval("DiscountPercent"))%>
			                    <asp:Label id="lblProductID" runat="server" Visible="False" Text='<%# Eval("ProductID") %>'></asp:Label>  
			                    <br />
			                    <%# Eval("Description") %><br />
		                        <a href="product.aspx?id=<%# Eval("ProductID") %>">更多</a> <img alt="More Detail" src="images/morearrow.gif">

                            </div>
                        </td>
                    </tr>
                </table>

	                
		                
            </ItemTemplate>
        </asp:DataList>
        
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetProductsByCategory"
        TypeName="CatalogManager">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="14" Name="categoryID" QueryStringField="cid"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?