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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="GoodsList.aspx.cs" Inherits="GoodsList" 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="476px" Height="854px">
  4.         <Columns>
  5.             <asp:TemplateField><ItemTemplate>
  6.             <table cellspacing ="2" cellpadding ="1">
  7.             <tr>
  8.             <td>
  9.             <img src="<%#Eval("GoodsUrl") %>" onerror="this.src=this.src.replace('~/','')" width="200" height="175"  /></td>
  10.            
  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="shengkaleibieLabel" runat="server" Text='<%# Eval("shengkaleibie") %>'></asp:Label><br />
  22.              <a href="audio.aspx?GoodsID=<%# Eval("GoodsID")%>"target="_blank">详细信息</a>
  23.              </td> 
  24.              </tr>
  25.              </table>
  26.             </ItemTemplate></asp:TemplateField>
  27.             
  28.         </Columns>
  29.         
  30.     </asp:GridView>   
  31.     <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/zzu.mdb"
  32.         SelectCommand="SELECT [GoodsName], [GoodsBrand], [MarketPrice], [GoodsUnit], [shengkaleibie], [GoodsUrl], [GoodsID], [ClassID] FROM [audio]">
  33.     </asp:AccessDataSource>
  34.     
  35. </asp:Content>