ASP Operation Cookies Save Delete instance

Source: Internet
Author: User


Response.Cookies ("111cnNet"). Domain = "www.xxx.com" specifies www.xxx.com access
Response.Cookies ("111cnNet"). Path = "E-blog" specifies e-blog Directory Access
Response.Cookies ("111cnNet"). Expires= DateAdd ("D", 2,date) ' specifies two days after expiration
Response.Cookies ("111cnNet") ("name") = "test"
Response.Cookies ("111cnNet ") (" type ") =" hehe "
[HTML]
The above two sentences are made of a dictionary-like cookie.
about the use of HasKeys, very simple, request. Cookies (cookies). HasKeys can be, for example, to determine whether a cookie is a dictionary, you can write
[code]
<%
If Request.Cookies ("111cnNet"). HasKeys Then
Response.Write "This is a dictionary cookie"
Else
Response.Write "This is not a dictionary cookie"
End If
%>

Response.Cookies (Cookiesname) [(Key) |. Attribute]=value
The explanation is as follows: Cookiesname is the name of the cookie you want, for example: test
Parameter key: Optional parameter, of course, not specified also can be. :)
Key is used to specify the name of the cookie for the dictionary cookie. My understanding seems to resemble an array.
Parameter attribute optional, specify the cookie itself related information, such as specifying a specific URL, path, expiration, and so on.
The optional values are: domain can only read cookies for a specific domain name
Expiration of Expires Cookies
Whether HasKeys contains child cookies
Path can only read cookies on the specified path
SECURE Specifies whether the cookie is encrypted
For example, to specify a cookie named 111cnNet on this web site, the following methods are:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.