[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 279
  • Last Modified:

Persistent and Non Persistent query

Persistent cookies: cookies are stored on your computer hard disk. They stay on your hard disk and can be accessed by web servers until they are deleted or have expired.

HttpCookie cookie = new HttpCookie(name);
cookie.Value = value;
cookie.Expires = Convert.ToDateTime("12/12/20083);
Response.Cookies.Add(cookie);
Non-persistent cookies: cookies are saved only while your web browser is running. They can be used by a web server only until you close your browser. They are not saved on your disk.

HttpCookie cookie = new HttpCookie(name);
cookie.Value = value;
Response.Cookies.Add(cookie);


Kindly suggest
0
KaranGupta
Asked:
KaranGupta
  • 2
1 Solution
 
rambovnCommented:
what is your problem?
0
 
KaranGuptaAuthor Commented:
I want to verify that the definition and example is correct or not
0
 
rambovnCommented:
yes, it is ok.
For more information: http://msdn.microsoft.com/en-us/library/ms178194.aspx
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now