Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 01:40 PM
Carl
Guest
 
Posts: n/a
Default 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)
%>
....


  #2  
Old July 19th, 2005, 01:40 PM
Patrice
Guest
 
Posts: n/a
Default Re: possible to pass cookie value from VB to ASP?

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" <carl@mm.no> a écrit dans le message de
news:OstvATHTEHA.2372@TK2MSFTNGP11.phx.gbl...[color=blue]
> 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)
> %>
> ...
>
>[/color]


  #3  
Old July 19th, 2005, 01:40 PM
Patrice
Guest
 
Posts: n/a
Default Re: possible to pass cookie value from VB to ASP?

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" <nobody@nowhere.com> a écrit dans le message de
news:ev7UslHTEHA.2236@TK2MSFTNGP09.phx.gbl...[color=blue]
> See :
> http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of the[/color]
Living[color=blue]
> 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[/color]
hanlde[color=blue]
> cookies client side (FYI clients-side unless in a controlled environment,
> JvaScript is generally preferred over VBScript)...
>
> Patrice
>
> "Carl" <carl@mm.no> a écrit dans le message de
> news:OstvATHTEHA.2372@TK2MSFTNGP11.phx.gbl...[color=green]
> > Hi,
> >
> > I want to pass the value of the cookie created in VB to ASP. This[/color][/color]
doesn't[color=blue][color=green]
> > 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)
> > %>
> > ...
> >
> >[/color]
>
>[/color]


  #4  
Old July 19th, 2005, 01:40 PM
Carl
Guest
 
Posts: n/a
Default Re: possible to pass cookie value from VB to ASP?

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" <nobody@nowhere.com> wrote in message
news:uQu1OrHTEHA.1472@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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[/color]
cookie.[color=blue]
> Also a cookie has a value.
>
> Patrice
>
> "Patrice" <nobody@nowhere.com> a écrit dans le message de
> news:ev7UslHTEHA.2236@TK2MSFTNGP09.phx.gbl...[color=green]
> > See :
> > http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of the[/color]
> Living[color=green]
> > Cookie" script.
> >
> > The cookie property contains actuzally all the cookies. It's probably[/color][/color]
best[color=blue][color=green]
> > to have some functions (such as those exposed by the above script) to[/color]
> hanlde[color=green]
> > cookies client side (FYI clients-side unless in a controlled[/color][/color]
environment,[color=blue][color=green]
> > JvaScript is generally preferred over VBScript)...
> >
> > Patrice
> >
> > "Carl" <carl@mm.no> a écrit dans le message de
> > news:OstvATHTEHA.2372@TK2MSFTNGP11.phx.gbl...[color=darkred]
> > > Hi,
> > >
> > > I want to pass the value of the cookie created in VB to ASP. This[/color][/color]
> doesn't[color=green][color=darkred]
> > > 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)
> > > %>
> > > ...
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


  #5  
Old July 19th, 2005, 01:40 PM
Patrice
Guest
 
Posts: n/a
Default Re: possible to pass cookie value from VB to ASP?

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" <carl@mm.no> a écrit dans le message de
news:ep2OVNJTEHA.1272@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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" <nobody@nowhere.com> wrote in message
> news:uQu1OrHTEHA.1472@TK2MSFTNGP09.phx.gbl...[color=green]
> > 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[/color]
> cookie.[color=green]
> > Also a cookie has a value.
> >
> > Patrice
> >
> > "Patrice" <nobody@nowhere.com> a écrit dans le message de
> > news:ev7UslHTEHA.2236@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > See :
> > > http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of the[/color]
> > Living[color=darkred]
> > > Cookie" script.
> > >
> > > The cookie property contains actuzally all the cookies. It's probably[/color][/color]
> best[color=green][color=darkred]
> > > to have some functions (such as those exposed by the above script) to[/color]
> > hanlde[color=darkred]
> > > cookies client side (FYI clients-side unless in a controlled[/color][/color]
> environment,[color=green][color=darkred]
> > > JvaScript is generally preferred over VBScript)...
> > >
> > > Patrice
> > >
> > > "Carl" <carl@mm.no> a écrit dans le message de
> > > news:OstvATHTEHA.2372@TK2MSFTNGP11.phx.gbl...
> > > > Hi,
> > > >
> > > > I want to pass the value of the cookie created in VB to ASP. This[/color]
> > doesn't[color=darkred]
> > > > 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)
> > > > %>
> > > > ...
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


  #6  
Old July 19th, 2005, 01:40 PM
Patrice
Guest
 
Posts: n/a
Default Re: possible to pass cookie value from VB to ASP?

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" <nobody@nowhere.com> a écrit dans le message de
news:%23AWPrUJTEHA.1548@TK2MSFTNGP11.phx.gbl...[color=blue]
> 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[/color]
Google).[color=blue]
> I posted also another message that points to an article that better[/color]
explains[color=blue]
> the details regarding cookies.
>
> Bascially the syntax would be rather "mycookie=10" to create a cookie[/color]
named[color=blue]
> "mycookie" whose value is 10.
>
> Patrice
>
> "Carl" <carl@mm.no> a écrit dans le message de
> news:ep2OVNJTEHA.1272@TK2MSFTNGP10.phx.gbl...[color=green]
> > 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" <nobody@nowhere.com> wrote in message
> > news:uQu1OrHTEHA.1472@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > This one looks like a good starting point to get an understanding of[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> > > cookie mechanism :
> > > http://www.sislands.com/javascript/week7/cookiedef.htm
> > >
> > > Of course instead of "name" you have to use the actual name of your[/color]
> > cookie.[color=darkred]
> > > Also a cookie has a value.
> > >
> > > Patrice
> > >
> > > "Patrice" <nobody@nowhere.com> a écrit dans le message de
> > > news:ev7UslHTEHA.2236@TK2MSFTNGP09.phx.gbl...
> > > > See :
> > > > http://home.att.net/~codeLibrary/HTML/form2.htm and the "Night of[/color][/color][/color]
the[color=blue][color=green][color=darkred]
> > > Living
> > > > Cookie" script.
> > > >
> > > > The cookie property contains actuzally all the cookies. It's[/color][/color][/color]
probably[color=blue][color=green]
> > best[color=darkred]
> > > > to have some functions (such as those exposed by the above script)[/color][/color][/color]
to[color=blue][color=green][color=darkred]
> > > hanlde
> > > > cookies client side (FYI clients-side unless in a controlled[/color]
> > environment,[color=darkred]
> > > > JvaScript is generally preferred over VBScript)...
> > > >
> > > > Patrice
> > > >
> > > > "Carl" <carl@mm.no> a écrit dans le message de
> > > > news:OstvATHTEHA.2372@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[/color][/color][/color]
with[color=blue][color=green][color=darkred]
> > > > > document.cookie="name=mycookie"
> > > > > </script>
> > > > >
> > > > > <%
> > > > > z=request.cookies("mycookie")
> > > > > response.write(z)
> > > > > %>
> > > > > ...
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles