ASP Object
ASP Object
- Request
- Response
- Application
- Session
- Server
- Built-in objects
Request: Exposes the client to the server. It is used to access information passed by HTTP request as explained earlier.
Response: Collects output back to the client.
Application:
- Represents the ASP page itself.
- The ASP files work together for the some purpose.
- The application object is used to tie these files together.
- It is used to store and access variables from any page.
- All users share ONE application object.
Session:
- Represents a continuity of connection. It is used to store information about, or change settings for a user section. The variables stored in the session object hold information about one single user and are available to all pages in one application.
- The server creates a new session object for each new user and destroys the Session object when the session expires.
- Session.Timeout()=15 : sets a timeout interval of 15 minutes.
- Session.Abandon() : to abandon a session immediately.
- Session.Contents.Remove() : to remove variables in a session.
Server:
- Provides services to the application.
- It is used to access methods and properties on the server.
- Server.CreateObject(objname) is used to create an instance of an object.
- Destroying an object stored in a session variable :
<% Session(“ad”)=Nothing%>.
- Server.Execute(path) : executes an ASP file from inside another ASP file.
After execution the control is returned to the original file.
Path is the location of the ASP file to be executed.
- Server.Transfer(path) : sends all the state information created in one ASP file to a second ASP file.
When the second page completes its tasks , it will NOT return to the first ASP page(like the Execute() method.)
Path is the location of the ASP file to be executed
Built-in objects:
