Page 244 - DCAP408_WEB_PROGRAMMING
P. 244
Web Programming
Notes The Session object is used to store information about, or change settings for a user session.
Variables stored in the Session object hold information about one single user, and are
available to all pages in one application.
When you are working with an application, you open it, do some changes and then you
close it. This is much like a Session. The computer knows who you are. It knows when you
start the application and when you end. But on the Internet there is one problem: the web
server does not know who you are and what you do because the HTTP address doesn’t
maintain state. ASP solves this problem by creating a unique cookie for each user. The
cookie is sent to the client and it contains information that identifies the user. This interface
is called the Session object.
The Session object is used to store information about, or change settings for a user session.
Variables stored in the Session object hold information about one single user, and are
available to all pages in one application. Common information stored in session variables
are name, id, and preferences. The server creates a new Session object for each new user,
and destroys the Session object when the session expires.
The ASP Server object is used to access properties and methods on the server.
The ASP Error object is used to display detailed information of any error that occurs in
scripts in an ASP page. The ASP Error object is implemented in ASP 3.0 and it is only
available in IIS5. The ASP Error object is created when Server.GetLastError is called, so the
error information can only be accessed by using the Server.GetLastError method.
9.8 Keywords
Application Object: Stores information (variables and objects) needed for all users of a particular
application. Information stored in the Application object persists for the lifetime of the application.
Class: A class in ASP is like a set of design rules that an object must conform to. In a class there
should be a minimum set of functions that your object must be able to perform.
Event: Object generates an event whenever something of interest happens. When an object
generates an event, the object can be said to fire the event. When the object has fired the event,
we say that the user must handle the event.
Instance of Object: By an instance of a object we mean a particular object that has a specific set of
properties and values The instances of an object represent completely different physical objects
but sharing the same types of characteristics such as methods, properties and events.
Method: A method is defined as an action that an object can take. The code in a method is
executed when the method is called. This calling is done by a command you write in the script
of your ASP page.
Object: An object is a software representation of a real-world item, or object. Software objects
feature properties, methods, and events.
Property of Object: Property of the object describes a particular aspect of the object. The property
is actually described as a name/value pair.
Server Object: Provides access to methods and properties on the server. These methods and
properties typically serve as utility functions.
Session Object: Stores information (variables and objects) needed for a particular user session.
Information stored in the Session object is not discarded when the user jumps between pages in
the application, but instead persists for the entire user session.
238 LOVELY PROFESSIONAL UNIVERSITY