Create a permanent cookie

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2006
Posts: 32
Reputation: sierrasoft is an unknown quantity at this point 
Solved Threads: 0
sierrasoft sierrasoft is offline Offline
Light Poster

Create a permanent cookie

 
0
  #1
Dec 22nd, 2008
How to create a permanent cookie?
And I am using Asp.Net 2.0
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 21
Reputation: pip22 is an unknown quantity at this point 
Solved Threads: 2
pip22 pip22 is offline Offline
Newbie Poster

Re: Create a permanent cookie

 
0
  #2
Dec 22nd, 2008
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:

  1. <%
  2. Response.Cookies("username") = "you"
  3. Response.Cookies("username").Expires = Date.MaxValue
  4. %>
Last edited by peter_budo; Dec 29th, 2008 at 11:21 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC