first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

ASP.NET Code: A Quick and Dirty Way to Make Cookies That Never Expire

The following takes advantage of the System.DateTime.MaxValue property, making sure that your cookie will not expire for a large time:

// Create a cookie.
HttpCookie cookUPrefs = new HttpCookie("UPrefs");
cookUPrefs.Value = "English";
cookUPrefs.Expires = System.DateTime.MaxValue;

By the way, removing cookies can also involve System.DateTime static members:

// Delete the cookie by setting its expiration.
Response.Cookies["UPrefs"].Expires = System.DateTime.Now;
mod date: 2005-03-15T22:29:31.000Z