possible to pass cookie value from VB to ASP?

Discussion in 'ASP General' started by Carl, Jun 7, 2004.

  1. Carl

    Carl Guest

    Hi,

    I want to pass the value of the cookie created in VB to ASP. This doesn't
    work. Any idea?
    Thanks
    Carl
    ....
    <script language=vbscript>
    document.cookie="mycookie" ' also tried with
    document.cookie="name=mycookie"
    </script>

    <%
    z=request.cookies("mycookie")
    response.write(z)
    %>
    ....
    Carl, Jun 7, 2004
    #1
    1. Advertising

  2. Carl

    Patrice Guest

    See :
    http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of the Living
    Cookie" script.

    The cookie property contains actuzally all the cookies. It's probably best
    to have some functions (such as those exposed by the above script) to hanlde
    cookies client side (FYI clients-side unless in a controlled environment,
    JvaScript is generally preferred over VBScript)...

    Patrice

    "Carl" <> a écrit dans le message de
    news:...
    > Hi,
    >
    > I want to pass the value of the cookie created in VB to ASP. This doesn't
    > work. Any idea?
    > Thanks
    > Carl
    > ...
    > <script language=vbscript>
    > document.cookie="mycookie" ' also tried with
    > document.cookie="name=mycookie"
    > </script>
    >
    > <%
    > z=request.cookies("mycookie")
    > response.write(z)
    > %>
    > ...
    >
    >
    Patrice, Jun 7, 2004
    #2
    1. Advertising

  3. Carl

    Patrice Guest

    This one looks like a good starting point to get an understanding of the
    cookie mechanism :
    http://www.sislands.com/javascript/week7/cookiedef.htm

    Of course instead of "name" you have to use the actual name of your cookie.
    Also a cookie has a value.

    Patrice

    "Patrice" <> a écrit dans le message de
    news:...
    > See :
    > http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of the

    Living
    > Cookie" script.
    >
    > The cookie property contains actuzally all the cookies. It's probably best
    > to have some functions (such as those exposed by the above script) to

    hanlde
    > cookies client side (FYI clients-side unless in a controlled environment,
    > JvaScript is generally preferred over VBScript)...
    >
    > Patrice
    >
    > "Carl" <> a écrit dans le message de
    > news:...
    > > Hi,
    > >
    > > I want to pass the value of the cookie created in VB to ASP. This

    doesn't
    > > work. Any idea?
    > > Thanks
    > > Carl
    > > ...
    > > <script language=vbscript>
    > > document.cookie="mycookie" ' also tried with
    > > document.cookie="name=mycookie"
    > > </script>
    > >
    > > <%
    > > z=request.cookies("mycookie")
    > > response.write(z)
    > > %>
    > > ...
    > >
    > >

    >
    >
    Patrice, Jun 7, 2004
    #3
  4. Carl

    Carl Guest

    Thanks, but my problem is not to pass cookies between html pages, but
    between VB (or Javascript) and ASP in the same page.
    That's what doesn'y work in my example ...




    "Patrice" <> wrote in message
    news:...
    > This one looks like a good starting point to get an understanding of the
    > cookie mechanism :
    > http://www.sislands.com/javascript/week7/cookiedef.htm
    >
    > Of course instead of "name" you have to use the actual name of your

    cookie.
    > Also a cookie has a value.
    >
    > Patrice
    >
    > "Patrice" <> a écrit dans le message de
    > news:...
    > > See :
    > > http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of the

    > Living
    > > Cookie" script.
    > >
    > > The cookie property contains actuzally all the cookies. It's probably

    best
    > > to have some functions (such as those exposed by the above script) to

    > hanlde
    > > cookies client side (FYI clients-side unless in a controlled

    environment,
    > > JvaScript is generally preferred over VBScript)...
    > >
    > > Patrice
    > >
    > > "Carl" <> a écrit dans le message de
    > > news:...
    > > > Hi,
    > > >
    > > > I want to pass the value of the cookie created in VB to ASP. This

    > doesn't
    > > > work. Any idea?
    > > > Thanks
    > > > Carl
    > > > ...
    > > > <script language=vbscript>
    > > > document.cookie="mycookie" ' also tried with
    > > > document.cookie="name=mycookie"
    > > > </script>
    > > >
    > > > <%
    > > > z=request.cookies("mycookie")
    > > > response.write(z)
    > > > %>
    > > > ...
    > > >
    > > >

    > >
    > >

    >
    >
    Carl, Jun 7, 2004
    #4
  5. Carl

    Patrice Guest

    Below in this page, you can download a script that provides ready to use
    cookie handling functions (setCookie, getCookie, deleteCookie and so on)
    know as "Night of the Living Cookie" (you should also find this on Google).
    I posted also another message that points to an article that better explains
    the details regarding cookies.

    Bascially the syntax would be rather "mycookie=10" to create a cookie named
    "mycookie" whose value is 10.

    Patrice

    "Carl" <> a écrit dans le message de
    news:...
    > Thanks, but my problem is not to pass cookies between html pages, but
    > between VB (or Javascript) and ASP in the same page.
    > That's what doesn'y work in my example ...
    >
    >
    >
    >
    > "Patrice" <> wrote in message
    > news:...
    > > This one looks like a good starting point to get an understanding of the
    > > cookie mechanism :
    > > http://www.sislands.com/javascript/week7/cookiedef.htm
    > >
    > > Of course instead of "name" you have to use the actual name of your

    > cookie.
    > > Also a cookie has a value.
    > >
    > > Patrice
    > >
    > > "Patrice" <> a écrit dans le message de
    > > news:...
    > > > See :
    > > > http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of the

    > > Living
    > > > Cookie" script.
    > > >
    > > > The cookie property contains actuzally all the cookies. It's probably

    > best
    > > > to have some functions (such as those exposed by the above script) to

    > > hanlde
    > > > cookies client side (FYI clients-side unless in a controlled

    > environment,
    > > > JvaScript is generally preferred over VBScript)...
    > > >
    > > > Patrice
    > > >
    > > > "Carl" <> a écrit dans le message de
    > > > news:...
    > > > > Hi,
    > > > >
    > > > > I want to pass the value of the cookie created in VB to ASP. This

    > > doesn't
    > > > > work. Any idea?
    > > > > Thanks
    > > > > Carl
    > > > > ...
    > > > > <script language=vbscript>
    > > > > document.cookie="mycookie" ' also tried with
    > > > > document.cookie="name=mycookie"
    > > > > </script>
    > > > >
    > > > > <%
    > > > > z=request.cookies("mycookie")
    > > > > response.write(z)
    > > > > %>
    > > > > ...
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Patrice, Jun 7, 2004
    #5
  6. Carl

    Patrice Guest

    Looks like a previous message didn't make it. The quick overview I was
    talking about is :
    http://www.sislands.com/javascript/week7/cookiedef.htm


    "Patrice" <> a écrit dans le message de
    news:%...
    > Below in this page, you can download a script that provides ready to use
    > cookie handling functions (setCookie, getCookie, deleteCookie and so on)
    > know as "Night of the Living Cookie" (you should also find this on

    Google).
    > I posted also another message that points to an article that better

    explains
    > the details regarding cookies.
    >
    > Bascially the syntax would be rather "mycookie=10" to create a cookie

    named
    > "mycookie" whose value is 10.
    >
    > Patrice
    >
    > "Carl" <> a écrit dans le message de
    > news:...
    > > Thanks, but my problem is not to pass cookies between html pages, but
    > > between VB (or Javascript) and ASP in the same page.
    > > That's what doesn'y work in my example ...
    > >
    > >
    > >
    > >
    > > "Patrice" <> wrote in message
    > > news:...
    > > > This one looks like a good starting point to get an understanding of

    the
    > > > cookie mechanism :
    > > > http://www.sislands.com/javascript/week7/cookiedef.htm
    > > >
    > > > Of course instead of "name" you have to use the actual name of your

    > > cookie.
    > > > Also a cookie has a value.
    > > >
    > > > Patrice
    > > >
    > > > "Patrice" <> a écrit dans le message de
    > > > news:...
    > > > > See :
    > > > > http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of

    the
    > > > Living
    > > > > Cookie" script.
    > > > >
    > > > > The cookie property contains actuzally all the cookies. It's

    probably
    > > best
    > > > > to have some functions (such as those exposed by the above script)

    to
    > > > hanlde
    > > > > cookies client side (FYI clients-side unless in a controlled

    > > environment,
    > > > > JvaScript is generally preferred over VBScript)...
    > > > >
    > > > > Patrice
    > > > >
    > > > > "Carl" <> a écrit dans le message de
    > > > > news:...
    > > > > > Hi,
    > > > > >
    > > > > > I want to pass the value of the cookie created in VB to ASP. This
    > > > doesn't
    > > > > > work. Any idea?
    > > > > > Thanks
    > > > > > Carl
    > > > > > ...
    > > > > > <script language=vbscript>
    > > > > > document.cookie="mycookie" ' also tried

    with
    > > > > > document.cookie="name=mycookie"
    > > > > > </script>
    > > > > >
    > > > > > <%
    > > > > > z=request.cookies("mycookie")
    > > > > > response.write(z)
    > > > > > %>
    > > > > > ...
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Patrice, Jun 7, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerry
    Replies:
    20
    Views:
    7,899
    Roedy Green
    Sep 9, 2005
  2. venkatagmail
    Replies:
    11
    Views:
    668
    James Kanze
    Oct 3, 2007
  3. Vols
    Replies:
    3
    Views:
    362
    Ian Collins
    Apr 28, 2008
  4. Tricky
    Replies:
    0
    Views:
    561
    Tricky
    Mar 19, 2009
  5. Martin

    Pass cookie value back to server?

    Martin, Mar 30, 2006, in forum: Javascript
    Replies:
    1
    Views:
    115
    Arnulf Sortland
    Mar 30, 2006
Loading...

Share This Page