Solved

Persistent and Non Persistent query

Posted on 2009-07-16
3
261 Views
Last Modified: 2013-12-17
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
Comment
Question by:KaranGupta
  • 2
3 Comments
 
LVL 8

Expert Comment

by:rambovn
ID: 24867614
what is your problem?
0
 

Author Comment

by:KaranGupta
ID: 24867641
I want to verify that the definition and example is correct or not
0
 
LVL 8

Accepted Solution

by:
rambovn earned 500 total points
ID: 24867757
yes, it is ok.
For more information: http://msdn.microsoft.com/en-us/library/ms178194.aspx
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now