Guest User

Untitled

a guest
Apr 27th, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 3.00 KB | None | 0 0
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/Styles/Site.Master" AutoEventWireup="true" CodeBehind="ProductsList.aspx.cs" Inherits="BunburyPlants.ProductsList" %>
  2. <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
  3. </asp:Content>
  4. <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  5.     <asp:ListView ID="ListView_Products" runat="server" DataKeyNames="ProductID"  DataSourceID="EDS_ProductsByCategory" GroupItemCount="2">
  6.        <EmptyDataTemplate><table runat="server"><tr><td>No data was returned.</td></tr></table></EmptyDataTemplate>
  7.         <EmptyItemTemplate><td runat="server" /></EmptyItemTemplate>
  8.         <GroupTemplate><tr ID="itemPlaceholderContainer" runat="server"><td ID="itemPlaceholder" runat="server"></td></tr></GroupTemplate>
  9.         <ItemTemplate>
  10.             <td runat="server">
  11.                 <table border="0" width="300">
  12.                     <tr>
  13.                         <td style="width: 25px;">&nbsp</td>
  14.                         <td style="vertical-align: middle; text-align: right;">
  15.                             <a href='ProductDetails.aspx?productID=<%# Eval("ProductID") %>'>
  16.                                 <image src='Catalog/Images/Thumbs/<%# Eval("ProductImage") %>' width="100" height="75" border="0">
  17.                             </a>&nbsp;&nbsp;
  18.                         </td>
  19.                          <td style="width: 250px; vertical-align: middle;">
  20.                             <a href='ProductDetails.aspx?productID=<%# Eval("ProductID") %>'><span class="ProductListHead"><%# Eval("ModelName") %></span><br></a>
  21.                             <span class="ProductListItem"><b>Special Price: </b><%# Eval("UnitCost", "{0:c}")%></span><br>
  22.                             <a href='AddToCart.aspx?productID=<%# Eval("ProductID") %>'><span class="ProductListItem"><b>Add To Cart<b></font></span></a>
  23.                         </td>
  24.                     </tr>
  25.                   </table>
  26.             </td>
  27.         </ItemTemplate>
  28.         <LayoutTemplate>
  29.             <table runat="server">
  30.                 <tr runat="server">
  31.                     <td runat="server">
  32.                         <table ID="groupPlaceholderContainer" runat="server">
  33.                             <tr ID="groupPlaceholder" runat="server"></tr>
  34.                         </table>
  35.                     </td>
  36.                 </tr>
  37.                 <tr runat="server"><td runat="server"></td></tr>
  38.             </table>
  39.         </LayoutTemplate>
  40.     </asp:ListView>
  41.     <asp:EntityDataSource ID="EDS_ProductsByCategory" runat="server"  EnableFlattening="False" AutoGenerateWhereClause="True"
  42.                           ConnectionString="name=CommerceEntities"  DefaultContainerName="CommerceEntities" EntitySetName="Products">
  43.                           <WhereParameters>
  44.                                 <asp:QueryStringParameter Name="CategoryID" QueryStringField="CategoryId" Type="Int32" />
  45.                           </WhereParameters>
  46.     </asp:EntityDataSource>
  47. </asp:Content>
Advertisement
Add Comment
Please, Sign In to add comment