When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Stump the SQL Guru!
XML Info
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
Published: Saturday, May 15, 1999

Bug fix for the "Creating a Customized Home Page" article.
by Christopher Miller

For some reason when you went to the edit page, if all of the fields were not filled in, some of the cookies would not save. What is ever stranger, every time you went back to the edit page, if you did not fill in each field, a cookie would one-by-one "disappear".

- continued -

I have been perplexed about this bug for some time now and have not come up with any reasonable explanation or solution. Until now...

I have recently received an email from a fellow ASP developer, Laura Morin, with a fix to this problem. She came up with the solution of storing the cookies with multiple keys, or "sub items". It seems to work. Here is an example:

Response.Cookies ("MyHomePage")("MyTableColor") = "#FFFFFF"
Response.Cookies ("MyHomePage")("MyBGColor") = "#000000"
Response.Cookies ("MyHomePage")("MyTextColor") = "#000000"

Notice how the name of the cookie does not change, only the sub item.

I hope this helps. Enjoy!

ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article