Monday 21, May 2012
Welcome Guest, Register | Login  
      Home    |    Tutorials    |    Free Ebooks    |    Free Scripts    |    Articles    |    Blog     |    About Us    |    Contact Us

ASP Cookies

ASP Cookies are used to store information specific to a visitor of your website. This cookie is stored to the user's computer for an extended amount of time. You can set cookie expiration date/time while creating a cookie.

Creating a cookie in ASP

"Response.Cookies" is used to create cookies. Here is the syntax and example.

<%
Response.Cookies("username")="Vinda"
%>

You can set a date when the cookie will expire:

<%
Response.Cookies("username")="Vinda"
Response.Cookies("username").Expires=#January 15,2011#
%>

Retrieving cookies in ASP

we can retrieve the value of the cookie by using Request.Cookies command.

<%
username=Request.Cookies("username")
response.write("username=" &username)
%>

ASP Cookie Arrays

Cookie arrays can contain a collection of multiple values. It is also known as Cookie with Keys.

<%
Response.Cookies("user")("name")="Vinda"
Response.Cookies("user")("level")="Editor"
Response.Cookies("user")("country")="India"
%>

 
     
   
ASP Tutorial
 
  ASP Introduction
ASP Introduction
  ASP Syntax
ASP Syntax
  ASP JavaScript
ASP JavaScript
  ASP Variables
ASP Variables
  ASP Arrays
ASP Arrays
  ASP If Statement
ASP If Statement
  ASP Procedures
ASP Procedures
  ASP Functions
ASP Functions
  ASP Sessions
ASP Sessions
  ASP Cookies
ASP Cookies
  ASP Application Object
ASP Application Object
  ASP Forms
ASP Forms
  ASP Comments
ASP Comments
  ASP Email
ASP Email
  ASP ADO
ASP ADO
  ASP File
ASP File
 
 
 
Web Designing Tutorials
  HTML Tutorial
HTML Tutorial
  DHTML Tutorial
DHTML  Tutorial
  CSS Tutorial
CSS Tutorial
  XHTML Tutorial
XHTML Tutorial
 
Programming Languages Tutorials
  C Language Tutorial
C Language Tutorial
  C++ Tutorial
C++ Tutorial
  Java Language Tutorial
Java Language Tutorial
  Data Structure Theory Tutorial
Data Structure Theory Tutorial
 
Server Side Scripting Tutorials
  PHP Tutorial
PHP Tutorial
  SQL Tutorial
SQL Tutorial
  ASP Tutorial
ASP Tutorial
 
Client Side Scripting Tutorials
  JavaScript Tutorial
JavaScript Tutorial
  VBScript Tutorial
VBScript Tutorial
 
 
 
POPULAR E-BOOKS
 
Download The Spam and Scam Report  Ebook The Spam and Scam Report
   
Download Practical PostgreSQL  Ebook Practical PostgreSQL
   
Download Passions To Profits Ebook Passions To Profits
   
Download List Building For Beginners  Ebook List Building For Beginners
   
Download Viral Marketing Secrets Ebook Viral Marketing Secrets
   
 
Studiesinn.com © 2012 All Rights Reserved.
Website Designed & Developed by TechXprtz