Hi there,
By default, cookies expire when you close the browser. That is, a cookie exists only for the duration of a browser session.
To make cookies durable, you need to set the Expires property, like this:
Code:
HttpCookie ckeName = new HttpCookie("Name");
ckeName.Value = txtName.Text;
ckeName.Expires = DateTime.Now.AddDays(10);
Response.Cookies.Add(ckeName);
This makes the cookie last for the next 10 days.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.