box.aspx
上传用户:vtryaojia
上传日期:2020-04-18
资源大小:1214k
文件大小:2k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage2.master"AutoEventWireup="true" CodeFile="box.aspx.cs" Inherits="box" %>
  2. <script runat="server">
  3.     protected void Page_Load(object sender, EventArgs e)
  4.     {
  5.     }
  6. </script>
  7. <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
  8.     &nbsp; &nbsp;&nbsp;
  9.     <asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="AccessDataSource1"
  10.         Height="50px" Width="487px" AutoGenerateRows="False" DataKeyNames="GoodsID">
  11.         <Fields>
  12.              <asp:TemplateField>
  13.                 <ItemTemplate>
  14.                 <img src="<%#Eval("GoodsUrl")%>" onerror="this.src=this.src.replace('~/','')" width="300" />
  15.                 </ItemTemplate>
  16.             </asp:TemplateField>
  17.             <asp:BoundField DataField="GoodsName" HeaderText="商品名称" SortExpression="GoodsName" />
  18.             <asp:BoundField DataField="MarketPrice" HeaderText="价格" SortExpression="MarketPrice" />
  19.             <asp:BoundField DataField="GoodsUnit" HeaderText="数量" SortExpression="GoodsUnit" />
  20.             <asp:BoundField DataField="Structure" HeaderText="机箱结构" SortExpression="Structure" />
  21.             <asp:BoundField DataField="boxinterface" HeaderText="机箱接口" SortExpression="boxinterface" />
  22.             <asp:BoundField DataField="Manner" HeaderText="机箱样式" SortExpression="Manner" />
  23.             <asp:BoundField DataField="Size" HeaderText="机箱尺寸" SortExpression="Size" />
  24.             <asp:BoundField DataField="GoodsBrand" HeaderText="品牌" SortExpression="GoodsBrand" />
  25.            
  26.             
  27.         </Fields>
  28.     </asp:DetailsView>
  29.         <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  30.             SelectCommand="SELECT [GoodsName], [MarketPrice], [GoodsUnit], [Structure], [boxinterface], [Manner], [Size], [GoodsBrand], [GoodsID], [ClassID],[GoodsUrl] FROM [box]">
  31.         </asp:AccessDataSource>
  32.     <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加到我的购物车" Width="210px" />
  33.     &nbsp;
  34.     </asp:Content>