My favorites
▼
|
Sign in
lineadecodigo
Web Code Samples in spanish
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
lineadecodigo_asp
/
usuarios
/
listar-cookies.asp
r478
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<%
'Mandamos una serie de cookies para probar el ejemplo
Response.Cookies("musicaPreferida") = "pop"
Response.Cookies("peliculaPreferida") = "Espartaco"
Response.Cookies("musicaPreferida").expires = "12/12/2009"
Response.Cookies("enlace")("normal") = "blue"
Response.Cookies("enlace")("visitado") = "red"
Response.Cookies("enlace")("activo") = "red"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Listar Cookies</title>
</head>
<body>
<h1>Listar cookies</h1<
<%
for each item in Request.Cookies
if Request.Cookies(item).HasKeys then
'La cookie es una colección
Response.Write("<p>La cookie <b>" + item
+ "</b> tiene un conjuno de parejas clave/atributo.")
for each subitem in Request.Cookies(item)
Response.Write "<br><strong>" + subitem + "</strong>:"
+ Request.Cookies(item)(subitem)
next
Response.Write("</p>")
else
'La cookie solamente tiene un valor
Response.Write "<p><strong>" + item + "</strong>:"
+ Request.Cookies(item) + "</p>"
end if
next
%>
<br><br>
<hr>
Artículo disponible en: <a href="http://lineadecodigo.com/asp/acceder-a-las-cookies-con-asp/">http://lineadecodigo.com/asp/acceder-a-las-cookies-con-asp/</a><br/>
<a href="http://lineadecodigo.com" title="Linea de Codigo">lineadecodigo.com</a>
</body>
</html>
Show details
Hide details
Change log
r189
by vcuervo on Oct 2, 2009
Diff
Listar cookies con ASP
Go to:
..._asp/usuarios/listar-cookies.asp
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 1471 bytes, 46 lines
View raw file
Powered by
Google Project Hosting