一聚教程网:一个值得你收藏的教程网站

热门教程

Developing ASP-Based Applications

时间:2022-06-30 10:04:37 编辑:袖梨 来源:一聚教程网

An ASP-based application consists of a virtual directory on a Web server and all the folders and files within that virtual directory. For more information about virtual directories, refer to your Microsoft Web server online documentation.
An application can be a simple home page; it can include a number of dynamic elements, such as the custom home page of the MSN™ online service (www.msn.com); or it can consist of a complex set of interrelated pages and logic.
When you use ASP-based applications, you are able to maintain state. State is the ability to retain information. You can use ASP to maintain two types of state:
Application state, in which all information pertaining to an application is available to all users of an application.
Session state, in which information is available only to a user of a specific session.
The ASP tools you use to manage state are the Session and Application built-in objects.
Using the Session and Application Objects
You can use the ASP built-in objects Session and Application to extend the functionality of your ASP-based applications.
Use the Session object to manage information for a user when that user is using an application. A session belongs, in effect, to a single user. The Application object is used to store common information that can be shared between all users of a single ASP-based application.
Using the Global.asa File
Each ASP-based application can have one Global.asa file. (The file name extension .asa stands for “Active Server Application.”) This file must be stored in the root directory of the application. ASP reads a Global.asa file when:
The Web server receives the first post-startup request for any .asp file in a given application; that is, after the Web server starts, the first request for any .asp file in an application causes ASP to read the Global.asa file for that application.
A user who does not have a session requests an .asp file in an application.

热门栏目