ASP.NET: How to set HttpCookie expiration time while it remains a session cookie?
<p>It seems from <a href="http://msdn.microsoft.com/en-us/library/system.web.httpcookie.expires.aspx" rel="nofollow">msdn</a>(comment at the page bottom), if you set the Expires property of a HttpCookie, it becomes a persistent cookie stored in the temp internet files folder. What to do if I want it to remain a session cookie (which means when you close the browser, it's gone), but still want to set the expiration time, say to 30 minutes? When you use the ASP.NET Membership API, you can set the expiration of a session cookie(the authentication cookie) in web.config, so it means there must be a way to set session cookie's expiration time.</p>
