Product Home Page | Developer Site | Version | |
The first example shows how to print the entire cookie collection:
<%
'Print out the entire cookie collection.
For Each cookie in Request.Cookies
If Not cookie.HasKeys Then
'Print out the cookie string
%>
<%= cookie %> = <%= Request.Cookies(cookie) %>
<%
Else
'Print out the cookie collection
For Each key in Request.Cookies(cookie) %>
<%= cookie %> (<%= key %>) = <%= Request.Cookies(cookie)(key) %>
<%
Next
End If
Next
%>
The next example prints the value of a cookie variable called "myCookie
":
<%= Request.Cookies("myCookie") %>
Copyright © 2003 Sun Microsystems, Inc. All rights reserved.