Posted on: 3/1/2011 6:52:02 AM | Views : 241

Hi!
I've never had this issue with cookies before, but it seems like I'm doing something wrong. Whenever someone visits our site, I check to see if a cookie exists, if it doesn't, we add one:
HttpCookie newCookie = new HttpCookie("CCC"); newCookie.Values.Add("LastVisit", new DateTime(1900, 1, 1).ToString()); newCookie.Values.Add("PreferredCampus", "Hudson"); newCookie.Expires = DateTime.Now.AddYears(1); Response.Cookies.Add(newCookie);
If there are any cancellations or other emergency announcements, I use the LastVisit value to determine if a jQuery call is made to show a modal popup:
if (lastVisit < notification.LastModifiedDate) { displayPopUp = true; }
 
Also, we use the cookie to keep track of which of our campuses the user has selected last (i.e. their "PreferredCampus"):

 Go to the complete details ...