Search Tools Links Login

Intro to the ASP Object Model


A brief overview of the ASP object model. I will be submitting more tutorials on each object in future submissions.

Original Author: Brad Hess from http://www.4aspdev.com

Code









  

Alright we have now written a very simple ASP
  page, but lets take some time and explore some of the built in features of
  ASP. The first thing that we should take a look at are the five intrinsic
  objects that are part of the ASP Scripting Context (an important note is
  that there is a sixth object which will be covered later). The diagram
  below shows the five main objects. They are the Request, Response,
  Application, Session, and Server.


  
  
  
  

  


  

  

Each of these objects has there its own methods
  and properties that the following sections are going to cover. To give a
  rough outline.

  


      
  • Request: This object exposes the
       properties of the HTTP request. A request is what is sent to the
       server when the browser asks for a particular action. For instance
       typing http://www.4aspdev.com/contact.asp
       is a request to the 4aspdev server for the contact.asp page. There is
       a lot more to it than that, but for now let's leave it at that.

      

      
  • Response: The response object exposes
       the properties of the server response. The response is what the server
       sends to the browser after a request is made. The response object
       allows you to:

      

        
    • Control what data is sent in the header of
          the HTTP response (don't worry if you don't know what a header is
          I will get to that later)

        
    • Control what data is sent to the client in
          the <:body> of the HTTP response

        
    • Control when and how the data is sent

    •   

      

      
  • Application: This object allow you to
       manipulate the properties of the application. In ASP an application is
       all the files in a virtual directory and its subdirectories.
       Application scope covers all users of the web site so if you set an
       application level variable or setting it will effect everyone that
       uses the site.

      

      
  • Session: This object allows you to
       control the properties on an individual user session. A session starts
       when a user first comes to you site and ends either when they leave,
       close their browser, or at a set timeout. Any variables or settings
       that are made using the session object are on an individual basis.

      

      
  • Server: This object effects the Server
       itself. This object allows you to control certain aspects of the
       server such as script timeout. Which is the time that a script is
       allowed to process.

  •   


About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 111 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.