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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="power.aspx.cs" Inherits="power" Title="Untitled Page" %>
  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="485px">
  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="Edition" HeaderText="电源版本:" SortExpression="Edition" />
  16.             <asp:BoundField DataField="Ratingpower" HeaderText="额定功率:" SortExpression="Ratingpower" />
  17.             <asp:BoundField DataField="Safeguard" HeaderText="保护功能:" SortExpression="Safeguard" />
  18.             <asp:BoundField DataField="Usearea" HeaderText="适用范围:" SortExpression="Usearea" />
  19.             <asp:BoundField DataField="Interfacedescription" HeaderText="接口描述:"
  20.                 SortExpression="Interfacedescription" />
  21.             <asp:BoundField DataField="Output" HeaderText="+12V输出:" SortExpression="Output" />
  22.             <asp:BoundField DataField="Output2" HeaderText="+5V输出:" SortExpression="Output2" />
  23.             <asp:BoundField DataField="GoodsBrand" HeaderText="品牌:" SortExpression="GoodsBrand" />
  24.         </Fields>
  25.     </asp:DetailsView>
  26.       &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加到我的购物车"
  27.           Width="270px" /><br />
  28.     
  29.         &nbsp;&nbsp;&nbsp; &nbsp;
  30.       <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  31.           SelectCommand="SELECT [GoodsName], [MarketPrice], [GoodsUnit], [Edition], [Ratingpower], [Safeguard], [Usearea], [Interfacedescription], [Output], [Output2], [GoodsBrand], [GoodsID], [ClassID], [GoodsUrl] FROM [power]">
  32.       </asp:AccessDataSource>
  33.       
  34.     </asp:Content>