possible to pass cookie value from VB to ASP?

C

Carl

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)
%>
....
 
P

Patrice

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
 
C

Carl

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 ...
 
P

Patrice

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top