Asp. Introduction to the use of application objects in net

Source: Internet
Author: User

This article mainly introduces the use of application objects in ASP.net, the need for friends can refer to the following

The application of Application object

1. Save information using the Application object

(1), use Application object to save information

Application ("key name") = value

or application ("Key Name", value)

(2), get 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 characteristics of application:

· Physical location of storage: server memory.

· Type limit for storage: any type.

· The scope of the state used: the entire application.

· Storage size limit: any size.

· Lifecycle: The application is created at the start (exactly when the user requests a URL for the first time) and is destroyed at the end of the application.

· Security and performance: Data is always stored on the server side, security is high, but it is not easy to store too much data.

· Advantages and Disadvantages: fast retrieval of data, but lack of self-management mechanism, data will not be automatically released.

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.