Introduction to application objects in ASP. NET

Source: Internet
Author: User

Application Object Application

1. Use the Application object to save information

(1) Use the Application object to save information

Application ("key name") = Value

Or Application ("key name", value)

(2) Obtain Application Object Information

Variable name = Application ("key name ")

Or: variable name = Application. Item ("key name ")

Or: variable name = Application. Get ("key name ")

(3) Update the value of the Application Object

Application. Set ("key name", value)

(4) Delete a key

Application. Remove ("key name", value)

(5) delete all keys

Application. RemoveAll ()

Or Application. Clear ()

Summarize the features of the Application:

· Physical storage location: Server Memory.

· Storage type restrictions: any type.

· Scope of status usage: the entire application.

· Storage size limit: any size.

· Life cycle: the application is created at the beginning (precisely the first time the user requests a URL) and destroyed at the end of the application.

· Security and performance: data is always stored on the server, which is highly secure but not easy to store too much data.

· Advantages and disadvantages and precautions: Data retrieval is fast, but data is not automatically released due to a lack of self-management mechanism.

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.