Expiring Cookies
Written by Eric Smith, Northstar Computer Systems LLC
If you are creating a cookie, be sure to set the Expires property of the cookie. If you don't, the cookie will disappear after the user closes the browser. Here's a quick example of how to do this:
Response.Cookies("UserID") = 12345
Response.Cookies("UserID").Expires = DateAdd("d", Date, 30)
This cookie will expire 30 days from the current date. If the second line was left off, the cookie would only be available during the current session.
Keywords: [
Uncategorized ASP Tips
]
Publication Date: 6/1/2000
|