ASP » Request » Cookies

Syntax:
Request.Cookies(Name)[(Key)|.Attribute]
Name
The Name argument specifies the name of the cookie to be retrieved.
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

The Cookies collection property contains the values of the cookies sent in the request.

The Cookies collection property allows you to access the values of the browser cookies sent in by requests.

There is one mandatory argument and two optional arguments.

You can iterate through a collection using a For Each ... Next loop.

Examples

Code:
<%
For Each objCK In Request.Cookies
   Response.Write objCK & " = " & Request.Cookies(objCK) & "<br>"
Next
%>
Output:
PRD2 = VBScript
PRD1 = ASP
MAIN = DevSite