Hi, I am setting a cookie with:
HttpCookie cookie = new HttpCookie("simpleorder");
cookie.Expires = DateTime.Now.AddYears(1);
cookie["order"] = carModel.ToString();
cookie["price"] = price.ToString();
Response.Cookies.Add(cookie);
But when I check it a few seconds later it is expired and the expiration date is set to {01-01-0001 00:00:00}. I try to retrieve the code by
HttpCookie cookie = Request.Cookies["simpleorder"];
if (cookie != null && cookie.Expires > DateTime.Now)...
I don't clear the cookie any place, so I don't know why it expires?