Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > possible to pass cookie value from VB to ASP?

Reply
Thread Tools

possible to pass cookie value from VB to ASP?

 
 
Carl
Guest
Posts: n/a
 
      06-07-2004
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)
%>
....


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      06-07-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> 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)
> %>
> ...
>
>



 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      06-07-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> > 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)
> > %>
> > ...
> >
> >

>
>



 
Reply With Quote
 
Carl
Guest
Posts: n/a
 
      06-07-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> a écrit dans le message de
> > news:(E-Mail Removed)...
> > > 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)
> > > %>
> > > ...
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      06-07-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> a écrit dans le message de
> > news:(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> a écrit dans le message de
> > > news:(E-Mail Removed)...
> > > > 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)
> > > > %>
> > > > ...
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      06-07-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> a écrit dans le message de
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> a écrit dans le message de
> > > news:(E-Mail Removed)...
> > > > 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" <(E-Mail Removed)> a écrit dans le message de
> > > > news:(E-Mail Removed)...
> > > > > 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)
> > > > > %>
> > > > > ...
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP : how can directly get the value of a specified cookie namewithout using a loop FROM the header.cookie ? stunaz Java 2 12-24-2010 03:08 PM
pass by value or pass by address? Vols C++ 3 04-27-2008 11:40 PM
Problem understanding pass by value and pass by reference of arrays and what happens in the memory venkatagmail C++ 11 10-03-2007 02:00 PM
Pass cookie value back to server? Martin Javascript 1 03-30-2006 07:00 PM
Pass by reference / pass by value Jerry Java 20 09-09-2005 06:08 PM



Advertisments