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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage2.master"AutoEventWireup="true" CodeFile="harddisk.aspx.cs" Inherits="harddisk" %>
  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="487px">
  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="Content" HeaderText="硬盘容量" SortExpression="Content" />
  16.             <asp:BoundField DataField="Interfacetype" HeaderText="接口类型" SortExpression="Interfacetype" />
  17.             <asp:BoundField DataField="Cache" HeaderText="缓存(MB)" SortExpression="Cache" />
  18.             <asp:BoundField DataField="Rev" HeaderText="转速/分" SortExpression="Rev" />
  19.             <asp:BoundField DataField="Head" HeaderText="磁头(个)" SortExpression="Head" />
  20.            
  21.             <asp:BoundField DataField="GoodsBrand" HeaderText="品牌" SortExpression="GoodsBrand" />
  22.         </Fields>
  23.     </asp:DetailsView>
  24.       &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加到我的购物车"
  25.           Width="215px" /><br />
  26.       <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  27.           SelectCommand="SELECT [GoodsName], [MarketPrice], [GoodsUnit], [Content], [Interfacetype], [Cache], [Rev], [Head], [GoodsBrand] ,[GoodsUrl] FROM [harddisk]">
  28.       </asp:AccessDataSource>
  29.         
  30.     </asp:Content>