Cookie mysteriously loses value!

  • Thread starter Thread starter daz_oldham
  • Start date Start date
D

daz_oldham

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
 
If you do not set an expiration time on your cookie, it will be an
"in-memory" only cookie.
Peter
 
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
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top