ShoppingCart.aspx
<script language="c#" runat="server">
static int i;
static int d=1;
static int n;
void typeid()
{
String type=Request.Params["type"];
Response.Write(type);
while((i<n)||(i==0))
{i++;}
Response.Write(i);
Response.Write(" ");
Session["id"+i]=Request.Params["type"];
Response.Write(" ");
Response.Write(Session["id"+i]);
n=i;
}
void type()
{
String type=Request.Params["type"];
Response.Write(type);
}
void list()
{ Response.Write(Session["id"+d]);
d++;
}
void clear()
{
while(n>=0)
{Session.Remove("id"+n);
n--;}
i=0;
n=0;
}
</script>
在中间列表中加了一列:
<TD width="60px"><b>Type</b></TD>
<TD width="60px"><%//#Container.ItemIndex+1%> <%list();%></TD>