Got a cookie problem, specifically with persisting it when I write to it a
second time on another ASP page. Here's the scenario:
Page1.asp:
- I have a cookie with serveral keys
- I set all the key values
- I then set the overall cookie expiration (you don't do this for all
the keys right, just at the top level?)
- This works fine, the cookie persists, but if I then go to page2.asp...
Page2.asp
- I simply use the response.cookie("cookiename")("KeyName") to update
some of the prior values.
Once page2.asp gets called, the cookie becomes a session cookie and does not
persist.
Questions:
1. I wasn't then re-setting the expiration, do I need to? I tried but still
the cookie wouldn't persist.
2. What is the correct order of setting the expiration, before, after
setting all the key values? Does it matter?
3. Can you in-fact update a cookie's key values, or is this fundamentally
incorrect, do you need to re-write the whole cookie?
4. Any other ideas?
Thanks,
Chad