最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
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.
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.
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21