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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="GoodsList4.aspx.cs" Inherits="GoodsList4" Title="Untitled Page" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  3.     <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" AllowPaging="True" PageSize="4" Width="475px">
  4.         <Columns>
  5.  
  6.             <asp:TemplateField><ItemTemplate>
  7.              <table cellspacing ="2" cellpadding ="1">
  8.             <tr>
  9.             <td>
  10.             <img src="<%#Eval("GoodsUrl") %>" alt="" onerror="this.src=this.src.replace('~/','')" width="200" height ="175" /></td>
  11.             <td>
  12.             商品名称:
  13.             <asp:Label ID="GoodsNameLabel" runat="server" Text='<%# Eval("GoodsName") %>'></asp:Label><br />
  14.             品牌:
  15.             <asp:Label ID="GoodsBrandLabel" runat="server" Text='<%# Eval("GoodsBrand") %>'></asp:Label><br />
  16.             价格:
  17.             <asp:Label ID="MarketPriceLabel" runat="server" Text='<%# Eval("MarketPrice") %>'></asp:Label><br />
  18.             数量:
  19.             <asp:Label ID="GoodsUnitLabel" runat="server" Text='<%# Eval("GoodsUnit") %>'></asp:Label><br />
  20.            光驱种类:
  21.             <asp:Label ID="BreedLabel" runat="server" Text='<%# Eval("Breed") %>'></asp:Label><br />
  22.            <a href="cd_rom.aspx?GoodsID=<%# Eval("GoodsID")%>"target="_blank">详细信息</a>
  23.             </td>
  24.             </tr>
  25.             </table>
  26.             
  27.              
  28.             </ItemTemplate></asp:TemplateField>
  29.             
  30.         </Columns>
  31.         
  32.     </asp:GridView>   
  33.     <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  34.         SelectCommand="SELECT [GoodsUrl], [GoodsBrand],[GoodsName], [MarketPrice], [GoodsUnit], [Breed],[GoodsID], [ClassID] FROM [cd_rom]">
  35.     </asp:AccessDataSource>
  36. </asp:Content>