DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Create a permanent cookie (http://www.daniweb.com/forums/thread163512.html)

sierrasoft Dec 22nd, 2008 1:12 am
Create a permanent cookie
 
How to create a permanent cookie?
And I am using Asp.Net 2.0

pip22 Dec 22nd, 2008 4:56 pm
Re: Create a permanent cookie
 
I found this:

How do you create a permanent cookie?

Posted in ASP.Net Interview Questions

If u want a cookie which never expires set it's "Expires" property equal to "DateTime.maxValue". Example:

<%
Response.Cookies("username") = "you"
Response.Cookies("username").Expires = Date.MaxValue
%>


All times are GMT -4. The time now is 9:39 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC