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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="audio.aspx.cs" Inherits="audio" Title="Untitled Page" %>
  2.   
  3.    <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
  4.       
  5.     <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="AccessDataSource1"
  6.         Height="50px" Width="486px" DataKeyNames="GoodsID">
  7.          
  8.         <Fields>
  9.               <asp:TemplateField>
  10.                 <ItemTemplate>
  11.                 <img src="<%#Eval("GoodsUrl")%>"alt="" onerror="this.src=this.src.replace('~/','')" width="300" />
  12.                 </ItemTemplate>
  13.             </asp:TemplateField>
  14.              <asp:BoundField DataField="GoodsName" HeaderText="商品名称" SortExpression="GoodsName" />
  15.            <asp:BoundField DataField="GoodsBrand" HeaderText="品牌" SortExpression="GoodsBrand" />
  16.             <asp:BoundField DataField="MarketPrice" HeaderText="价格" SortExpression="MarketPrice" />
  17.             <asp:BoundField DataField="GoodsUnit" HeaderText="数量" SortExpression="GoodsUnit" />
  18.             <asp:BoundField DataField="shengkaleibie" HeaderText="声卡类别" SortExpression="shengkaleibie" />
  19.             <asp:BoundField DataField="GoodsIntroduce" HeaderText="产品简介" SortExpression="GoodsIntroduce" />
  20.                 
  21.         </Fields>
  22.        
  23.     </asp:DetailsView>
  24.        &nbsp;&nbsp;&nbsp; &nbsp;
  25.        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加到我的购物车" />&nbsp;
  26.       <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  27.           SelectCommand="SELECT [GoodsName], [GoodsBrand], [GoodsUrl], [MarketPrice], [GoodsUnit], [GoodsIntroduce],[shengkaleibie], [ClassID], [GoodsID] FROM [audio]">
  28.       </asp:AccessDataSource>
  29.        &nbsp;&nbsp;
  30.   </asp:Content>