Using Browser Cookies : Introduction « Cookie « ASP.NET Tutorial






When a web server creates a cookie, an additional HTTP header is sent to the browser when a page is served to the browser. 
The HTTP header looks like this:

Set-Cookie: message=Hello


After a cookie has been created on a browser, whenever the browser requests a page from the same application in the future, the browser sends a header that looks like this:

Cookie: message=Hello

You can store only string values when using a cookie.

Two types of cookies: session cookies and persistent cookies. 

A session cookie exists only in memory. 
A persistent cookie can last for months or even years. 
A persistent cookie is stored permanently by the user's browser on the user's computer.








12.1.Introduction
12.1.1.Using Browser Cookies
12.1.2.Creating a new cookie.
12.1.3.Create a persistent cookie.