How many types of cookies are there in ASP.NET ?

 Posted by Majith on 7/24/2008 | Category: ASP.NET Interview questions | Views: 30771

1. Single valued


2. Multi valued


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Charan on: 12/5/2010 | Points: 10
they are 2 types of cookies.
1)Session Cookies & 2) Peristance Cookies
Posted by: Abhishek1950 on: 4/13/2012 | Points: 10
• In-memory cookies: An in-memory cookie goes away when the user shuts the browser down.
• Persistent cookies: A persistent cookie resides on the hard drive of the user and is retrieved when the user comes back to the Web page.

If you create a cookie without specifying an expiration date, you are creating an in-memory cookie, which lives for that browser session only. The following illustrates the script that would be used for an in-memory cookie:
Response.Cookies("SiteArea") = "TechNet"

The following illustrates the script used to create a persistent cookie:
Response.Cookies("SiteArea") = "TechNet"
Response.Cookies("SiteArea").Expires = "August 15, 2000"

Login to post response