473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

quick cookie questions

YT
Couple of quick ASP (3.0) Cookie questions:

1/ I'm using a cookie in my asp script to place cookies (within a key) so my code looks like:
Response.Cookies( "quoteform" )( "name" ) = Session( "name" )
Response.Cookies( "quoteform" )( "organization" ) = Session( "organization" )
Response.Cookies( "quoteform" )( "address1" ) = Session( "address" )
Response.Cookies( "quoteform" )( "address2" ) = Session( "suite" )
Response.Cookies( "quoteform" )( "city" ) = Session( "city" )
Response.Cookies( "quoteform" )( "provstate" ) = Session( "provstate" )
Response.Cookies( "quoteform" )( "postzip" ) = Session( "postzip" )
Response.Cookies( "quoteform" )( "email" ) = Session( "email" )
Response.Cookies( "quoteform" )( "phone" ) = Session( "phone" )
Response.Cookies( "quoteform" )( "fax" ) = Session( "fax" )

Can i set the expires property to this entire key? Like so:
Response.Cookies( "quoteform" ).Expires = DateAdd( "m", 1, Now )
Or do i have to set the expires property for each cookie above?

2/ Is there a really quick way of removing all of the above cookies? or do i have to do something like:
Response.Cookies( "quoteform" )( "name" ) = ""
Response.Cookies( "quoteform" )("name").Expires = DateAdd( "d", -1, Now )
Thanks!
yt

Jul 19 '05 #1
1 1520
Someone will probably come along and correct me on this, but I belive the
only way to set expires on a cookie like that is Response.Cookies(
"quoteform" ).expires = ... since ( "name" ) for instance isn't the name of
the cookie, only a subkey in it.

What you've actually got is ONE cookie, "quoteform", with lots of subkeys.
You remove it by setting it's expires property to date - 1.
--
William Morris
Product Development, Seritas LLC
Kansas City, Missouri
"YT" <yt******@MAPSONfunkychickens.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Couple of quick ASP (3.0) Cookie questions:

1/ I'm using a cookie in my asp script to place cookies (within a key) so my
code looks like:
Response.Cookies( "quoteform" )( "name" ) = Session( "name" )
Response.Cookies( "quoteform" )( "organization" ) = Session(
"organization" )
Response.Cookies( "quoteform" )( "address1" ) = Session( "address" )
Response.Cookies( "quoteform" )( "address2" ) = Session( "suite" )
Response.Cookies( "quoteform" )( "city" ) = Session( "city" )
Response.Cookies( "quoteform" )( "provstate" ) = Session(
"provstate" )
Response.Cookies( "quoteform" )( "postzip" ) = Session( "postzip" )
Response.Cookies( "quoteform" )( "email" ) = Session( "email" )
Response.Cookies( "quoteform" )( "phone" ) = Session( "phone" )
Response.Cookies( "quoteform" )( "fax" ) = Session( "fax" )

Can i set the expires property to this entire key? Like so:
Response.Cookies( "quoteform" ).Expires = DateAdd( "m", 1, Now )
Or do i have to set the expires property for each cookie above?

2/ Is there a really quick way of removing all of the above cookies? or do i
have to do something like:
Response.Cookies( "quoteform" )( "name" ) = ""
Response.Cookies( "quoteform" )("name").Expires = DateAdd( "d", -1,
Now )
Thanks!
yt
Jul 19 '05 #2

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

Similar topics

0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
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,...

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.