Understanding of response. Cookies and request. Cookies in ASP. NET (discussion)

Source: Internet
Author: User

You need to save the user name and password when creating a project these days. You have never done anything similar before when you go to school, but you have done two example during the class and will never do it again. It is the first time to use cookies in practical applications.

An accident is not good. First, I have several questions listed. Of course, I have my own understanding. If not, please point out.

1. When the expires attribute of httpcookie is set and the cookie is obtained again after the setting is successful, the actual value is not displayed, but it does exist.

2. The Cookies obtained by response. cookies do not have any child keys. No matter whether or not the child keys are set in advance, the haskeys attribute of response. Cookies is always false.

3. Setting cookies to take effect seems to take effect after this request is completed. The debugging phase does not seem to see the effect of cookies.

4. Cookie. Values. Remove (key); response. Cookies. Remove (cookiename); are unavailable. I don't know why.

 

Thank you for your answers!

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.