473,405 Members | 2,279 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,405 software developers and data experts.

Cookie mysteriously loses value!

Hi All

I have been working fine on my project, and now all of a sudden one of
my cookies is losing its value for no reason at all.

I am doing my get/set in the following way:

Response.Cookies["Flight"]["SearchCriteriaID"]
Request.Cookies["Flight"]["SearchCriteriaID"]

I have gone through my code several times, but cant spot what I am
doing wrong. Does anybody have any pointers?

Thanks

Darren

Jul 27 '06 #1
2 1478
If you do not set an expiration time on your cookie, it will be an
"in-memory" only cookie.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"daz_oldham" wrote:
Hi All

I have been working fine on my project, and now all of a sudden one of
my cookies is losing its value for no reason at all.

I am doing my get/set in the following way:

Response.Cookies["Flight"]["SearchCriteriaID"]
Request.Cookies["Flight"]["SearchCriteriaID"]

I have gone through my code several times, but cant spot what I am
doing wrong. Does anybody have any pointers?

Thanks

Darren

Jul 27 '06 #2
Hi Peter

And I presume that as with ASP, the cookie will live for the length of
the session - which is exactly what I want to do.

Is there any issues between in-memory cookies and different
sub-directories?

I really can't understand why some of my cookies are keeping their
values, and others aren't. I've got around eight cookies.

Thanks for the assistance.

Darren

Peter wrote:
If you do not set an expiration time on your cookie, it will be an
"in-memory" only cookie.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"daz_oldham" wrote:
Hi All

I have been working fine on my project, and now all of a sudden one of
my cookies is losing its value for no reason at all.

I am doing my get/set in the following way:

Response.Cookies["Flight"]["SearchCriteriaID"]
Request.Cookies["Flight"]["SearchCriteriaID"]

I have gone through my code several times, but cant spot what I am
doing wrong. Does anybody have any pointers?

Thanks

Darren
Jul 27 '06 #3

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

Similar topics

2
by: Michael | last post by:
I am reading and setting a cookie using JavaScript in the BODY onload and onunload events respectively. This works fine. However when I use ASP to set the cookie under some condition where I...
1
by: Chris Kennedy | last post by:
I am writing the value from a textarea input box to a cookie. Long story but when I return to the page I want to pull the value from the cookie and put it back in the textbox. When I do this all...
5
by: brettr | last post by:
When I reference document.cookie, there is a long string of key=value; pairs listed. I may have 100 hundred cookies on my hard drive. However, most only have one key=value pair. Does the...
3
by: Wysiwyg | last post by:
After a server created cookie is processed on the client I want it removed, cleared, or expired in the javascript block but have been unable to do this. If I set a cookie value in the server code...
1
by: CR1 | last post by:
I found a great cookie script below, but don't know how to make it also pass the values sent to the cookie, to a querystring as well for tracking purposes. Can anyone help? If there was a way to...
1
by: Steven M. | last post by:
Greetings... I need desperate help with my problem. I guess the solution is related in some way with the cookies getting lost in the authentication process working with some web servers. ...
6
by: kelvlam | last post by:
Hello all, I'm still a bit new with JavaScript, and I hope the guru here can shed some light for me. It's regarding handling cookie and the case-sensitive nature of JavaScript itself. My...
0
by: far | last post by:
hi all, I am setting the value of the cookie in my parent page( lets call it main.aspx) then when you click on a button, a modalwindow is displayed that will show the detail info of main.aspx. ...
3
by: Milsnips | last post by:
Hi there, i had a small project where i used a session to store the shopping cart, but if it times out, the user loses the cart. Then i thought instead of using session, i'll store the cart in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
0
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...

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.