Shop.aspx
1)在产品图下加上<%#Convert.ToChar(Container.ItemIndex+65)%>,显示字母序列。
2)在开头添加C#语句
<script language="c#" runat="server">
void blank()
{ Response.Write(" - ");}
void type()
{
String type=Request.Params["Type"];
Session["ID"]=product.Brand+" - "+type;
Response.Write(type);
}
void id()
{Response.Write(Session["ID"]);}
</script>
3)在ID号那添加修改文本框及按钮
<%blank();%>
<input name="choose" type="text" class="inputbg" value="<%type();%>" size="1" maxlength="1"/>
<input name="Amend" type="button" onClick="javascript:window.location.href='show.aspx?pid=<%=product.ProductID%>&Type=' + document.all.choose.value;" value="Amend"> <%id();%>
4)传值给下个页面,修改<from>
<form name="pDetails" action='shoppingcart.aspx?pid=<%=product.ProductID%>&type=<%type();%>' method=post target="cart" onSubmit="window.open('','cart','width=700,height=850,scrollbars=yes,top=0,left=0')">
2.为其他页面添加传送到show.aspx的初始值 &type=A ,其中页面包括HotProduct.ascx、Search.aspx、List.aspx