Setting and Retrieving from Cookies

Results 1 to 2 of 2

Thread: Setting and Retrieving from Cookies

  1. #1
    Join Date
    Dec 1969

    Default Setting and Retrieving from Cookies

    Hi!<BR><BR>Just wanted to know how to set cookies and request information from cookies. Thanks!<BR><BR>-Surojit

  2. #2
    David Mann Guest

    Default RE: Setting and Retrieving from Cookies

    Cookies are a collection that can be accessed by both the Response Object and the Request Object. The way to set a cookie is:<BR><BR>&#060;% Response.Cookies("myCookie") = "cookie data" %&#062;<BR><BR>This temporarily stores a cookie with the name "myCookie" and the value = "cookie data." <BR><BR>To retrieve this cookie, just do this:<BR><BR>&#060;% Request.Cookies("myCookie") %&#062;<BR><BR>and voila! You now have your cookie. This method, however, only sets a cookie to live as long as the browser session is over. To find out more about cookies, point your browser to the below URL for more information:<BR><BR><BR><BR>This page tells you all about setting cookie attributes and such. Enjoy!<BR><BR>Sincerely,<BR> --David<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts