Author: Rafael_Soteldo | Posted on: 2/26/2010 11:10:10 AM | Views : 608

Hi there:
I cannot make a cookie expiration date to have a correct date, it's always 1-1-0001.
my cookie creation is like this:
HttpCookie cookie = new HttpCookie("CookieData");
cookie["Name"] = txtName.Text.Trim();
cookie.Expires = DateTime.Now.AddDays(1);
Response.Cookies.Add(cookie);
 
And I'm retrieving like (in other form):
HttpCookie cookie;
cookie = Request.Cookies["CookieData"];
if (cookie != null) {
   lblName.Text = cookie["Nam ...

Go to the complete details ...