how do i create cookies that endure forever? and how to read them? i tried the following:
Code:
DateTime date = new DateTime(9999, 12, 20);
HttpCookie userCookie = new HttpCookie("user", "xxxxxxx");
HttpCookie pwCookie = new HttpCookie("pw", "xxxxxx");
userCookie.Expires = date;
pwCookie.Expires = date;
Response.SetCookie(new HttpCookie("user", "xxxxxx"));
Response.SetCookie(new HttpCookie("pw", "xxxxxx"));
and then in another page tried to load it
Code:
Label1.Text = Request.Cookies["user"].Value;
Label2.Text = Request.Cookies["pw"].ToString();
but i get a error when a object doesnt exist..what am i doing wrong?

tks