程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> .NET網頁編程 >> ASP.NET >> 關於ASP.NET >> asp.net實現購物車詳細代碼

asp.net實現購物車詳細代碼

編輯:關於ASP.NET

<%@ Page language="c#" Codebehind="shoppingcart.aspx.cs" AutoEventWireup="false" Inherits="myshop.shoppingcart" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML> <HEAD>
<title>shoppingcart
</title>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312"> <LINK href="mycss.css" type="text/css" rel="stylesheet">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> </HEAD>
<body> <center>
<form id="Form1" runat="server"> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td>
<asp:DataGrid id="ShoppingCartDlt" runat="server" Width="500" BackColor="white" BorderColor="black" ShowFooter="false" CellPadding="3" CellSpacing="0" Font-Name="Verdana" Font-Size="8pt" HeaderStyle-BackColor="#cecfd6" AutoGenerateColumns="false" MaintainState="true"> <Columns>
<asp:TemplateColumn HeaderText="刪除">
<ItemTemplate> <center>
<asp:CheckBox id="chkProductID" runat="server" /> </center>
</ItemTemplate> </asp:TemplateColumn>
<asp:BoundColumn DataField="ProdID" HeaderText="ID" />
<asp:BoundColumn DataField="ProName" HeaderText="商品名稱" />
<asp:BoundColumn DataField="UnitPrice" HeaderText="單價" />
<asp:TemplateColumn HeaderText="數量">
<ItemTemplate>
<asp:TextBox id="CountTb" runat="server" Text='<%#DataBinder.Eval( Container.DataItem,"ProdCount" )%>'> </asp:TextBox>
</ItemTemplate> </asp:TemplateColumn>
<asp:BoundColumn DataField="TotalPrice" HeaderText="小計( 元 )" /> </Columns> </asp:DataGrid></td> </tr> </table> <br> <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <td>
<asp:Button id="update" runat="server" Text="更新我的購物車" CssClass="button2" /></td> <td>
<asp:Button id="CheckOut" runat="server" Text="結算" CssClass="button5" />
<input type="button" name="close2" value="繼續購物" onClick="window.close( );
return false;
" class="button2"></td> <td align="right"><br>
<asp:Label id="label" runat="server" Width="100px" Visible="True" ForeColor="#FF8080" Height="18px"></asp:Label></td> </tr> </table>
</form> </center>
</body></HTML>

以上為HTML頁面部分

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved