468,110 Members | 1,821 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

possible to pass cookie value from VB to ASP?

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)
%>
....
Jul 19 '05 #1
5 1816
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" <ca**@mm.no> a écrit dans le message de
news:Os**************@TK2MSFTNGP11.phx.gbl...
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)
%>
...

Jul 19 '05 #2
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" <no****@nowhere.com> a écrit dans le message de
news:ev**************@TK2MSFTNGP09.phx.gbl...
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" <ca**@mm.no> a écrit dans le message de
news:Os**************@TK2MSFTNGP11.phx.gbl...
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)
%>
...


Jul 19 '05 #3
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" <no****@nowhere.com> wrote in message
news:uQ**************@TK2MSFTNGP09.phx.gbl...
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" <no****@nowhere.com> a écrit dans le message de
news:ev**************@TK2MSFTNGP09.phx.gbl...
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" <ca**@mm.no> a écrit dans le message de
news:Os**************@TK2MSFTNGP11.phx.gbl...
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)
%>
...



Jul 19 '05 #4
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" <ca**@mm.no> a écrit dans le message de
news:ep**************@TK2MSFTNGP10.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:uQ**************@TK2MSFTNGP09.phx.gbl...
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" <no****@nowhere.com> a écrit dans le message de
news:ev**************@TK2MSFTNGP09.phx.gbl...
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" <ca**@mm.no> a écrit dans le message de
news:Os**************@TK2MSFTNGP11.phx.gbl...
> 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)
> %>
> ...
>
>



Jul 19 '05 #5
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" <no****@nowhere.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP11.phx.gbl...
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" <ca**@mm.no> a écrit dans le message de
news:ep**************@TK2MSFTNGP10.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:uQ**************@TK2MSFTNGP09.phx.gbl...
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" <no****@nowhere.com> a écrit dans le message de
news:ev**************@TK2MSFTNGP09.phx.gbl...
> 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" <ca**@mm.no> a écrit dans le message de
> news:Os**************@TK2MSFTNGP11.phx.gbl...
> > 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)
> > %>
> > ...
> >
> >
>
>



Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Naseem | last post: by
1 post views Thread by Martin | last post: by
5 posts views Thread by Mike Copeland | last post: by
2 posts views Thread by =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.