使用hashtable实现的购物车

80酷酷网    80kuku.com

  购物车<% Page Language="VB" ContentType="text/html" Debug="true"%>

<% import namespace="system.data" %>

<% import namespace="system.data.oledb" %>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>无标题文档</title>

<style type="text/css">

<!--

td {

font-size: 9pt;

line-height: 24px;

}

-->

</style>

<style type="text/css">

<!--

a:link {

color: #000000;

text-decoration: none;

}

a:hover {

color: #FF0000;

text-decoration: none;

}

a:visited {

text-decoration: none;

}

-->

</style>

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<form runat="server">

<!--#include virtual="header.htm"-->

<table width="776" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="159">  </td>

<td width="617"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="17%" height="26"><p> </p>

<p>您所选购的商品</p></td>

<td width="2%" height="26"> </td>

<td width="81%" height="26"> </td>

</tr>

<tr>

<td height="26"> </td>

<td height="26"> </td>

<td height="26"><asp:Datagrid ID="dgCar" runat="server"

autogeneratecolumns="false"

BorderColor="#000000"

BorderWidth="1"

CellPadding="3"

HeaderStyle-BackColor="#990000"

HeaderStyle-ForeColor="#FFFFFF"

DataKeyField="title_id"

>

<columns>

<asp:boundcolumn HeaderText="商品" DataField="title" ItemStyle-Width="300"></asp:boundcolumn>

<asp:templatecolumn HeaderText="数量">

<itemtemplate>

<asp:textbox size=1 id="Qty" runat="server"

text='<%# Databinder.eval(container.dataitem,"qty")%>'/>

</itemtemplate>

</asp:templatecolumn>

<asp:boundcolumn HeaderText="单价" DataField="price" DataFormatString="{0:c}"></asp:boundcolumn>

<asp:boundcolumn HeaderText="总计" DataField="total" DataFormatString="{0:c}"></

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: