<% Response.buffer=true If IsObject(Session("cart")) Then Set dictCart = Session("cart") Else Set dictCart = Server.CreateObject("Scripting.Dictionary") End If If request("row")<>"" then row=request("row") for i=1 to row pid=request("checkbox"&i) if pid<>"" then If dictCart.Exists(pid) Then 'do nothing Else Set dictItems = Server.CreateObject("Scripting.Dictionary") countItem = dictCart.Count If countItem <= 17 Then dictItems.add "pid", pid dictCart.add pid, dictItems End If End If Set Session("cart") = dictCart End if Next End if %> Add To Cart
<% If IsObject(Session("cart")) Then Set dictCart = Session("cart") %> <% Else %> <% End If%>
 
   Products in Cart :
<%j=1 for each key in dictCart Set dictItems=dictCart.item(key) %>
"> <%=j%> <%=dictItems("pid")%>
<%If j mod 6 = 0 Then Response.Write("
") End If j=j+1 Next%>
 
<% For each key in dictCart Set dictItems=dictCart.item(key) msg = msg &dictItems("pid")&";" j=j+1 Next %> Send Enquiry    
Your Cart is empty!! 
 
 
<% If countItem >=17 Then Response.Write("") End If %>