ShoppingCart.aspx
上传用户:xiecaij
上传日期:2015-02-08
资源大小:2016k
文件大小:5k
源码类别:

百货/超市行业

开发平台:

ASP/ASPX

  1. <%@ Page language="c#" Codebehind="ShoppingCart.aspx.cs" AutoEventWireup="false" Inherits="eshop.ShoppingCart" %>
  2. <%@ Register TagPrefix="eshop" TagName="CategoryList" Src="UserControl/CategoryList.ascx" %>
  3. <%@ Register TagPrefix="eshop" TagName="HeaderMenu" Src="UserControl/HeaderMenu.ascx" %>
  4. <%@ Register TagPrefix="eshop" TagName="UserMenu" Src="UserControl/UserMenu.ascx" %>
  5. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  6. <HTML>
  7. <HEAD>
  8. <title>EShop</title>
  9. <LINK href="Styles.css" type="text/css" rel="stylesheet">
  10. </HEAD>
  11. <body>
  12. <table cellSpacing="0" cellPadding="0" width="100%" border="0">
  13. <tr>
  14. <td colSpan="2"><eshop:headermenu id="Header1" runat="server"></eshop:headermenu></td>
  15. </tr>
  16. <tr>
  17. <td valign="top" width="145">
  18. <span id="LogOutArea" runat="server">
  19. <eshop:CategoryList id="Menu1" runat="server" />
  20. </span>
  21. <span id="LogInArea" runat="server">
  22. <eshop:UserMenu id="Menu2" runat="server" />
  23. </span>
  24. <img height="1" src="images/space.gif" width="145">
  25. </td>
  26. <td align="left" valign="top" width="700">
  27. <table align="center" width="100%" border="0">
  28. <TBODY>
  29. <tr valign="bottom">
  30. <form id="Form1" method="post" runat="server">
  31. <td align="center">
  32. <font color="red">
  33. <asp:Label id="MyError" class="ErrorText" EnableViewState="false" runat="Server" />
  34. </font>
  35. <asp:panel id="DetailsPanel" runat="server">
  36. <IMG height="1" src="images/1x1.gif" width="50" align="left">
  37. <TABLE height="100%" cellSpacing="0" cellPadding="0" width="550" border="0">
  38. <TR vAlign="top">
  39. <TD width="550">
  40. <asp:DataGrid id="MyList" runat="server" AutoGenerateColumns="false" DataKeyField="Quantity" AlternatingItemStyle-CssClass="CartListItemAlt"
  41. ItemStyle-CssClass="CartListItem" FooterStyle-CssClass="CartListFooter" HeaderStyle-CssClass="CartListHead"
  42. ShowFooter="true" Font-Size="8pt" Font-Name="Verdana" cellspacing="0" cellpadding="4" GridLines="Vertical"
  43. BorderColor="black" Width="90%">
  44. <AlternatingItemStyle CssClass="CartListItemAlt"></AlternatingItemStyle>
  45. <ItemStyle CssClass="CartListItem"></ItemStyle>
  46. <HeaderStyle CssClass="CartListHead"></HeaderStyle>
  47. <FooterStyle CssClass="CartListFooter"></FooterStyle>
  48. <Columns>
  49. <asp:TemplateColumn HeaderText="商品编号">
  50. <ItemTemplate>
  51. <asp:Label id="bookID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "productID") %>' />
  52. </ItemTemplate>
  53. </asp:TemplateColumn>
  54. <asp:HyperLinkColumn DataNavigateUrlField="productID" DataNavigateUrlFormatString="ProductInfo.aspx?productID={0}"
  55. DataTextField="productName" HeaderText="商品名称">
  56. <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
  57. </asp:HyperLinkColumn>
  58. <asp:BoundColumn DataField="ProductPrice" HeaderText="价格" DataFormatString="{0:c}"></asp:BoundColumn>
  59. <asp:TemplateColumn HeaderText="数量">
  60. <ItemTemplate>
  61. <asp:TextBox id=Quantity runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Quantity") %>' width="40px" MaxLength="3" Columns="4">
  62. </asp:TextBox>
  63. </ItemTemplate>
  64. </asp:TemplateColumn>
  65. <asp:BoundColumn DataField="ExtendedAmount" HeaderText="小计" DataFormatString="{0:c}"></asp:BoundColumn>
  66. <asp:TemplateColumn HeaderText="删除">
  67. <ItemTemplate>
  68. <center>
  69. <asp:CheckBox id="Remove" runat="server" />
  70. </center>
  71. </ItemTemplate>
  72. </asp:TemplateColumn>
  73. </Columns>
  74. </asp:DataGrid><SPAN class="NormalBold">总计: 
  75.                   </SPAN>
  76. <asp:Label class="NormalBold" id="lblTotal" runat="server" EnableViewState="false"></asp:Label><BR>
  77. <BR>
  78. <asp:button id="UpdateBtn" runat="server" Text="更新购物车"></asp:button><IMG height="1" src="Images/1x1.gif" width="15">
  79. <asp:button id="CheckoutBtn" runat="server" Width="96px" Text="结算"></asp:button><BR>
  80. </TD>
  81. </TR>
  82. </TABLE>
  83. </asp:panel>
  84. </td>
  85. </form>
  86. </tr>
  87. </TBODY>
  88. </table>
  89. </td>
  90. </tr>
  91. </table>
  92. </body>
  93. </HTML>