Sets a cookie's name, path, value and expiry date. (Cookie Collection, Read/Write.)
Response.Cookies(CookieName)(Key).Property = Value
Response.Cookies.Item(CookieName).SubItem(Key).Property = Value
It is recommended that you use the helper_js.csp file for cross
Optional string for the name of the cookie you wish to access. If you do not include this you will access one of the properties listed in the Cookie Collection Properties.
If this optional string is specified the cookie becomes a dictionary. See Remarks.
Optional name of the property you wish to access. Note that this is not a variable. It may be one of the properties listed in Cookie Properties.
The value of the cookies property.
The Property part of the Cookies property is optional, if you do not include it the cookies Value property is accessed by default. If you do not include a cookie name or a cookie key then the Cookie Collection Properties is accessed. Note the following regarding keys and cookies.
If you write a cookie with a name and key as such:
Response.Cookies("MyDog")("ThePoodle") = "Fluffy" Response.Cookies("MyDog")("TheBoxer") = "Iggy"
If you now proceed to set the cookie using simply the name you will lose the names of both different cookies set using the key. That is the following statement will erase any other values written to the cookie.
Response.Cookies("MyDog") = "Fido"
You will now be unable to retrieve the value of either:
A client can only store of a maximum of 20 cookies per server or domain with a maximum size of 4KB per cookie.
Property | Description |
---|---|
The path of the cookie. If this is not set, the application path is used. (String, Read | |
Property | Description |
---|---|
A cookie in the collection. Access using |
There is an additional example in the Cookies Property under the Request Object.
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |