% public ProductList if request("order")="Renew quantity" then Session("ProductList")="" end if ProductList = Session("ProductList") Sub PutToShopBag(Prodid, ProductList) If Len(ProductList) = 0 Then ProductList = "'" & Trim(Prodid) & "'" ElseIf InStr( ProductList, Prodid ) <= 0 Then ProductList = ProductList&", '"&Trim(Prodid)&"'" End If End Sub %> <% Product_Id = Trim(Request("Product_Id")) if instr(Product_Id,",")>0 then idArr=Split(Product_Id, ",") for i = 0 to ubound(idArr) PutToShopBag idArr(I), ProductList next else PutToShopBag Product_Id, ProductList end if %> <% Session("ProductList") = ProductList if len(productlist)>2 then sql="select * from Product where Product_Id in ("&ProductList&") order by Product_Id" Set rs_price = conn.Execute(sql) else response.redirect "product.asp" response.end end if %>