⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product.aspx

📁 简介:功能描述:商品的分类显示、浏览商品、用户登录、选购和调整购物车、集中结算、存储订单、查看订单
💻 ASPX
字号:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="product.aspx.cs" Inherits="product" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
        CellPadding="3" DataSourceID="SqlDataSource1" GridLines="Vertical" OnRowCommand="GridView1_RowCommand"
        Width="293px">
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <Columns>
            <asp:BoundField DataField="productid" HeaderText="商品编号" InsertVisible="False" SortExpression="productid" />
            <asp:BoundField DataField="productname" HeaderText="产品名称" SortExpression="productname" />
            <asp:BoundField DataField="quantiyperunit" HeaderText="单位数量" SortExpression="quantiyperunit" />
            <asp:BoundField DataField="unitprice" HeaderText="单价" SortExpression="unitprice" />
            <asp:ButtonField ButtonType="Button" CommandName="Select" HeaderText="选择" ShowHeader="True"
                Text="购买" />
        </Columns>
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#DCDCDC" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"
        SelectCommand="SELECT [productid], [productname], [categoryid], [quantiyperunit], [unitprice] FROM [product] WHERE ([categoryid] = @categoryid)">
        <SelectParameters>
            <asp:QueryStringParameter Name="categoryid" QueryStringField="cid" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

⌨️ 快捷键说明

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