Results 1 to 2 of 2

Thread: HELP! Deleting Individual cookie subkeys

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    2

    HELP! Deleting Individual cookie subkeys

    Please can someone help me. This is my ASP code:

    <%@ LANGUAGE="VBSCRIPT" %>
    <%Response.Buffer=true%>
    <HTML>
    <BODY>

    <%
    Response.Cookies("List")("item1")="1"
    Response.Cookies("List")("item2")="2"
    Response.Cookies("List")("item3")="3"

    acookie = Request.Cookies("List")
    subkeyname = "item3"
    Response.Write acookie
    Response.Write "<BR><BR>"
    acookie.Values.Remove(subkeyname)
    %>

    I want to understand how to remove individual
    subkeys (in this case "item3"). I looked at msdn
    to create the code above, but this code keeps
    producing this error:

    Microsoft VBScript runtime (0x800A01A8)
    Object required: 'item3=3&item2=2&125='
    /testcookie/try00.asp, line 15


    Please can someone tell me what's going wrong?



    James

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    2

    Re: HELP! Deleting Individual cookie subkeys

    I've found a solution to my prob above.

    What I really wanted to achieve (the bigger picture) was an understanding of how I could manipulate cookies using VBScript to make a temporary shopping cart. The values with which could be used to update a database.

    The solution I came up with is really cumbersome and I'm really busy so I will not be able to publish it until next week,

    J

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width