PDA

View Full Version : Cookie Basics


admin
05-28-2003, 11:25 PM
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") %>