What are the differences between ASP. NET application, session, Cookie, viewstate, cache, and other variables?

Source: Internet
Author: User

Application is public and can be seen by all people, so it can be used for chatting rooms,

The session is private. Each client has a different session. The lifetime is normal for 20 minutes. You can set it to 1 minute or 2 hours.

A cookie is a file stored on the local machine. It records short information. It will always exist unless you make the cookie expire.

Viewstate is similar to the hidden control in ASP. It is used to record the status of the control in the page. It is mainly used when information is transmitted between pages,

Cache is a cache used to record some data that has been executed. For example, to read the database, it aims to accelerate the display and reduce the burden on the server. You can set the expiration time on your own,

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.