article

Intro to the ASP Object Model

Email
Submitted on: 1/5/2015 6:47:00 AM
By: Brad Hess from http://www.4aspdev.com (from psc cd)  
Level: Beginner
User Rating: By 3 Users
Compatibility: ASP (Active Server Pages)
Views: 1549
 
     A brief overview of the ASP object model. I will be submitting more tutorials on each object in future submissions.

 
				

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.


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.