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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="storage.aspx.cs" Inherits="storage" Title="Untitled Page"Debug="false" %>
  2.    <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
  3.       
  4.     <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="AccessDataSource1"
  5.         Height="50px" Width="489px">
  6.         <Fields>
  7.           <asp:TemplateField>
  8.                 <ItemTemplate>
  9.                 <img src="<%#Eval("GoodsUrl")%>" alt=""onerror="this.src=this.src.replace('~/','')" width="300" />
  10.                 </ItemTemplate>
  11.             </asp:TemplateField>
  12.             <asp:BoundField DataField="GoodsName" HeaderText="品牌" SortExpression="GoodsName" />
  13.             <asp:BoundField DataField="MarketPrice" HeaderText="销售价" SortExpression="MarketPrice" />
  14.             <asp:BoundField DataField="GoodsUnit" HeaderText="数量" SortExpression="GoodsUnit" />
  15.             <asp:BoundField DataField="Type" HeaderText="内存类型" SortExpression="Type" />
  16.             <asp:BoundField DataField="Content" HeaderText="内存容量" SortExpression="Content" />
  17.             <asp:BoundField DataField="Workfrequency" HeaderText="工作频率" SortExpression="Workfrequency" />
  18.             <asp:BoundField DataField="Interfacetype" HeaderText="接口类型" SortExpression="Interfacetype" />
  19.             <asp:BoundField DataField="Pressure" HeaderText="电压(V)" SortExpression="Pressure" />
  20.             <asp:BoundField DataField="GoodsBrand" HeaderText="品牌" SortExpression="GoodsBrand" />
  21.             
  22.            
  23.         </Fields>
  24.     </asp:DetailsView>
  25.        &nbsp;&nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加到我的购物车"
  26.            Width="235px" /><br />
  27.     
  28.         &nbsp;&nbsp;&nbsp; &nbsp;
  29.        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  30.            SelectCommand="SELECT [GoodsName], [MarketPrice], [GoodsUnit], [Type], [Content], [Workfrequency], [Interfacetype], [Pressure], [GoodsBrand], [GoodsUrl] FROM [storage]">
  31.        </asp:AccessDataSource>
  32.       
  33.     </asp:Content>