comparison Demo/Asp.Net/Web/Controls/ShoppingCartControl.ascx @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 <%@ Control AutoEventWireup="true" CodeFile="ShoppingCartControl.ascx.cs" Inherits="PetShop.Web.ShoppingCartControl" Language="C#" %>
2 <asp:Panel ID="panFocus" runat="server" DefaultButton="btnTotal">
3
4 <div align="left" class="cartHeader">Items in your Shopping Cart</div>
5 <asp:Label runat="server" ID="lblMsg" EnableViewState="false" CssClass="label" />
6
7 <asp:Repeater ID="repShoppingCart" runat="server">
8 <HeaderTemplate>
9 <table cellspacing="0" cellpadding="3" rules="all" border="0" class="cart" align="center" width="387">
10 <tr class="labelLists">
11 <th scope="col">&nbsp;</th>
12 <th scope="col">Name</th>
13 <th scope="col">Qty</th>
14 <th align="right" scope="col">Price</th>
15 <th scope="col">&nbsp;</th>
16 </tr>
17 </HeaderTemplate>
18 <ItemTemplate>
19 <tr class="listItem">
20 <td>
21 <asp:ImageButton ID="btnDelete" runat="server" BorderStyle="None" CausesValidation="false"
22 CommandArgument='<%# Eval("ItemId") %>' CommandName="Del" ImageUrl="~/Comm_Images/button-delete.gif"
23 OnCommand="CartItem_Command" ToolTip="Delete" />
24 </td>
25 <td style="width:100%;">
26 <a runat="server" href='<%# string.Format("~/Items.aspx?itemId={0}&productId={1}&categoryId={2}", Eval("ItemId"), Eval("ProductId"), Eval("CategoryId")) %>'><%# string.Format("{0} {1}", Eval("Name"), Eval("Type")) %></a>
27 </td>
28 <td>
29 <asp:TextBox ID="txtQuantity" runat="server" Columns="3" Text='<%# Eval("Quantity") %>' Width="20px"></asp:TextBox>
30 </td>
31 <td align="right"><%# Eval("Price", "{0:c}")%></td><td>
32 <asp:ImageButton ID="btnToWishList" runat="server" AlternateText="Move to wish list" CausesValidation="false" CommandArgument='<%# Eval("ItemId") %>' CommandName="Move" ImageUrl="~/Comm_Images/button-wishlist.gif" OnCommand="CartItem_Command" ToolTip="Move to wish list" />
33 </td>
34 </tr>
35 </ItemTemplate>
36 <FooterTemplate>
37 </table>
38 </FooterTemplate>
39
40 </asp:Repeater>
41 <asp:PlaceHolder ID="plhTotal" runat="server" EnableViewState="false">
42 <table border="0" cellpadding="0" cellspacing="0" width="387">
43 <tr>
44 <td class="dottedLineCentered" colspan="4">&nbsp;</td>
45 </tr>
46 <tr>
47 <td class="total" width="30">Total </td><td>
48 <asp:ImageButton ID="btnTotal" runat="server" AlternateText="Calculate total" CausesValidation="false"
49 ImageUrl="~/Comm_Images/button-calculate.gif" OnClick="BtnTotal_Click" EnableViewState="false" /></td>
50 <td align="right" class="total">
51 <asp:Literal ID="ltlTotal" runat="server" EnableViewState="false"></asp:Literal></td><td width="30">&nbsp;</td>
52 </tr>
53 </table>
54 </asp:PlaceHolder>
55 </asp:Panel>