My research indicates that, if I create a cookie and don't set the expiration date, it will expire when the browser is closed.
So I created a cookie like this:
Response.Cookies.Set(new HttpCookie("MyKey", "X"));
But when I close the browser and then reopen it, the following expression equals true:
Request.Cookies["MyKey"] != null
How can I have the cookie expire when the browser session ends?
Note: For my purposes, using static data instead of a cookie seems ideal. But my understanding is that an ASP.NET can restart for a variety of reasons, and that could pull the rug out from under the current user if I lost this setting.