Bytes Expert Newtork: Connect with experts in IT / Business | Expert Topics



Search


Go Back   Programmers Resource > Code Section > ASP Tips & Code Snippets
User Name
Password


 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-28-2003, 11:25 PM
admin admin is offline
Administrator
 
Join Date: May 2003
Posts: 116
Cookie Basics

The Cookies collection is what handles all cookie requests. Cookies are used for many different purposes such as welcoming your visitor back to your site, allowing the visitor to specify how
he/she wants to view the site, or to just track your visitors.

Create a cookie...

<%
Response.Cookies("UserID")="Bill and Hillary"
Response.Cookies("UserID").Expires="Dec 31, 1999"
%>

Optionally, you can leave off the .expires method. Doing this will cause the cookie to expire when the session is terminated (left your site).

View the cookie...

<%=Request.Cookies("UserID") %>
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 06:50 AM.



Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All content Copyright ©1999 - 2010, Programmers Resource, unless otherwise noted.