473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=vbscri pt>
document.cookie ="mycookie" ' also tried with
document.cookie ="name=mycookie "
</script>

<%
z=request.cooki es("mycookie")
response.write( z)
%>
....
Jul 19 '05 #1
5 2077
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******** ******@TK2MSFTN GP11.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=vbscri pt>
document.cookie ="mycookie" ' also tried with
document.cookie ="name=mycookie "
</script>

<%
z=request.cooki es("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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP11.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=vbscri pt>
document.cookie ="mycookie" ' also tried with
document.cookie ="name=mycookie "
</script>

<%
z=request.cooki es("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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP11.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=vbscri pt>
document.cookie ="mycookie" ' also tried with
document.cookie ="name=mycookie "
</script>

<%
z=request.cooki es("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=1 0" to create a cookie named
"mycookie" whose value is 10.

Patrice

"Carl" <ca**@mm.no> a écrit dans le message de
news:ep******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP11.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=vbscri pt>
> document.cookie ="mycookie" ' also tried with
> document.cookie ="name=mycookie "
> </script>
>
> <%
> z=request.cooki es("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******** ********@TK2MSF TNGP11.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=1 0" to create a cookie named "mycookie" whose value is 10.

Patrice

"Carl" <ca**@mm.no> a écrit dans le message de
news:ep******** ******@TK2MSFTN GP10.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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP09.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******** ******@TK2MSFTN GP11.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=vbscri pt>
> > document.cookie ="mycookie" ' also tried with > > document.cookie ="name=mycookie "
> > </script>
> >
> > <%
> > z=request.cooki es("mycookie")
> > response.write( z)
> > %>
> > ...
> >
> >
>
>



Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2524
by: | last post by:
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be reading in online articles?
15
5741
by: joun | last post by:
Hi all, i want to create in my asp.net application a custom server variable, so i can retrieve later in other pages (even asp or perl) with request.servervariables("HTTP_mycustomvariable") i've tried with response.appendheader("mycustomvariable", "somevalue") but this doesn't work, or the variable scope is limited to aspx files, not asp...
3
3211
by: Naseem | last post by:
I am using CR in ASP.NET , I am able to show drill down graphs where grouping is done on single column from result set of sql query, is it possible to achieve drill down by grouping on multiple groups? -Naseem
1
1804
by: Martin | last post by:
I have a web page that displays records from a database. I want to allow the user to specify his own "page size" - that is, the number of records to be displayed on a given page. I have a place set up for him to enter a value and save it to a cookie. My problem is, I can't figure out a good, simple way to pass that value back to the server. ...
3
10351
by: JDS | last post by:
So, I'd like to create the following scenario: 1) Use cURL library within PHP (cURL + "Cookie Jar", et.al) to create a virtual browser session that "logs in" to a remote site. (For example: here: http://curl.haxx.se/libcurl/php/examples/cookiejar.html and here: http://curl.haxx.se/libcurl/php/examples/ebay_login.html
0
1113
by: coachdave | last post by:
Hi all, I have been learning asp and html and javascript by bits and pieces. Specifically I want to send a short string from my asp page to be stored on a cookie on the client's computer. I have javascript to write the cookie, and read it. My problem is getting the data from asp to the client-side javascipt. What I have been doing, and it isn't...
5
5908
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Is there an easier way to handle that? I used Javascript to handle this when our two domains are hosted on two different servers(on different networks) and our search engine marketing people don't like the javascript links since they think the links are not favorable to a search robot. Now our company is thinking about hosting these...
5
1039
by: Mike Copeland | last post by:
In a Web site I'm building, I want to provide an ability to set a "flag" message that users can see when they log on. Specifically, I want the "flag" to show when the (snail) mail for our building has been delivered, so people can come to the mailboxes to pick up their incoming mail. The problem is that I want to have a staff person "set the...
2
11291
by: =?Utf-8?B?U3RldmVuIFRhbmc=?= | last post by:
I'm creating a XBAP application and want it take some input from webpage dynamically? what is the best way? how to do it? Best Regards Steven -- ======================= Steven Tang SYWWUYU)
0
7484
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7440
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5997
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3470
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.