Request Object
All Objects
All Collections
Request.Cookies
COLLECTION PROPERTY: Request.Cookies
Request.
Cookies
(Name)[(Key)|.Attribute]
The
Cookies
collection property allows you to access the values of the browser cookies sent in by requests.
There is one mandatory argument.
Name
The
Name
argument specifies the name of the cookie to be retrieved.
There are two optional arguments.
Key
The
Key
argument specifies which value from the cookie dictionary to retrieve.
Attribute
The optional
Attribute
argument is the boolean variable
HasKeys
.
True indicates that the cookie contains keys.
False indicates that the cookie does not contains keys
You can iterate through a collection using a
For Each ... Next
loop.
Code:
<%
For Each objCK In
Request.Cookies
Response.Write objCK & " = " &
Request.Cookies
(objCK) & "<br>"
Next
%>
Output:
PRD2 = VBScript
PRD1 = ASP
MAIN = DevSite
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information