ASP: how to clear an application

Source: Internet
Author: User

If a large number of applications are used in the website, it will occupy a large amount of server resources. Therefore, when we exit the background, we can clear the data and the website will run faster.
Application Object implementation in a given application ProgramAll users share the information and save the data permanently during the running of the server. In addition, the application object also provides methods to control access to application layer data and events that can be used to trigger the process when the application starts or stops.

Although the application object does not have built-in attributes, we can use the following syntax to set user-defined attributes, also known as collections.

Application ("attribute/Set Name") = Value

BelowCodeExplains how to create and clear an application
Create an application assignment: <% application ("AA") = "lhp" %> <br/>
Print Application Value: <% = Application ("AA") %> <br/>
<HR/>
Use ASP to clear the application object code:Copy codeThe Code is as follows: <%
'Application. Contents. removeall
'Application. Contents. Remove ("variable name ")
Application. Contents. Remove ("AA ")
%>
<Br/>
Print Application Value: <% = Application ("AA") %>

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.