Shop.aspx

   1)在产品图下加上<%#Convert.ToChar(Container.ItemIndex+65)%>,显示字母序列。
   2)在开头添加C#语句
     <script language="c#" runat="server"> 
     void blank()
       { Response.Write("&nbsp;-&nbsp;");} 
      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">&nbsp;&nbsp;<%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

相关文章:

  • 2021-08-19
  • 2021-06-06
  • 2021-08-03
  • 2021-06-20
  • 2021-06-20
  • 2021-09-22
猜你喜欢
  • 2021-11-16
  • 2021-06-30
  • 2021-07-06
  • 2021-05-31
  • 2022-12-23
  • 2021-06-01
  • 2021-11-02
相关资源
相似解决方案