sloppycode.net
ASP Reference



Response.Cookies.Item(string item).[attribute]

Writes a cookie to the client's machine, providing they have cookies enabled. For example 'Response.Cookies.Item("yourdata") = "anydatahere"'.

As with other collection objects, this can be shortened to 'Response.Cookies("yourdata")'. Subkeys can also be set, in the format of ("yourdata").("subkeyhere").

Attributes that can be set:
[Domain] - Sets the cookie so that it can only be read by the domain specified in [Domain];

[Expires] - Sets the expirary date of the cookie. By default the cookie expires at the end of the user session. This should be in the format of "Response.Cookies("cookiename").Expires = #January 01,2001#';

[Haskeys] - Read only value to determine whether the cookie has subkeys;

[Path] - Represents the virtual directory that the cookie can only be read from;

[Secure] - Specifies whether the cookie can only be sent if the client is using SSL.
› Home
› C#
› Snippets
› Articles
› Tools
› Taglines
› ASP
› Dictionary Object
› FSO
› Unix cheat sheet
› Gaming
› CSS
› Yak
› Umbraco
› About
› Contact
› Privacy
› Projects
› Search
› Sitemap





Buy on Amazon



Buy on Amazon



Buy on Amazon



Buy on Amazon