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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#"MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="cd_rom.aspx.cs" Inherits="cd_rom" %>
  2.   
  3.    <asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
  4.     <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="488px" AutoGenerateRows="False" DataSourceID="AccessDataSource1">
  5.         <Fields>
  6.              <asp:TemplateField>
  7.                 <ItemTemplate>
  8.                 <img src="<%#Eval("GoodsUrl")%>" onerror="this.src=this.src.replace('~/','')" width="200" />
  9.                 </ItemTemplate>
  10.             </asp:TemplateField>
  11.             <asp:BoundField DataField="GoodsName" HeaderText="名称" SortExpression="GoodsName" />
  12.             <asp:BoundField DataField="GoodsBrand" HeaderText="品牌" SortExpression="GoodsBrand" />
  13.             <asp:BoundField DataField="MarketPrice" HeaderText="价格" SortExpression="MarketPrice" />
  14.             <asp:BoundField DataField="GoodsUnit" HeaderText="数量" SortExpression="GoodsUnit" />
  15.             <asp:BoundField DataField="Breed" HeaderText="光驱种类" SortExpression="Breed" />
  16.         </Fields>
  17.     </asp:DetailsView>
  18.        &nbsp;&nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加到我的购物车"
  19.            Width="188px" /><br />
  20.        <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  21.            SelectCommand="SELECT [GoodsName], [GoodsBrand], [MarketPrice], [GoodsUnit], [Breed],[GoodsUrl] FROM [cd_rom]">
  22.        </asp:AccessDataSource>
  23.    </asp:Content>