Objects
CONTRIBUTOR: Shahjahan Alhassan - 4th Nov 2001

  • There are five main objects (Response, Request, Server, Session and Application).


  • An object is a self-contained piece of code that performs specific tasks.


  • Methods are associated with objects and specify the way in which it can be used.


  • Properties are attributes of objects and determine the status of an object.


  • Collections are associated with some objects and gather information about an object.


  • Events are associated with some objects and triggers code when that event occurs.


  • Response Object
    Property Description
    Buffer Determines if an ASP page should be buffered until complete.
    CacheControl Determines if proxy servers can store ASP generated output in the cache.
    Charset Specifies the character set used by an ASP page.
    ContentType Specifies the type of content an ASP contains.
    Expires Specifies the number of minutes that a web browser stores an ASP page in its cache.
    ExpiresAbsolute Specifies the date and time that a cached ASP page will expire in a web browser.
    IsClientConnected Determines if the client is connected to the web server.
    PICS Sets the content rating for rating services, e.g family filtering software.
    Status Indicates the status of a client's request for an ASP page.
    Method Description
    AddHeader Sends information about an ASP page to the client.
    AppendToLog Adds an entry to the log file on the web server.
    BinaryWrite Sends binary information to the client.
    Clear Clears information from the buffer.
    End Terminates the processing of code in an ASP page.
    Flush Sends information stored in the buffer to the client immediately.
    Redirect Sends the client to a different web page.
    Write Sends data to the client.
    Collection Description
    Cookies Creates a cookie file on a user's computer.
     
    Request Object
    Property Description
    TotalBytes Determines the number of bytes sent by the client in a request.
    Method Description
    BinaryRead Retrieves binary information sent to the web server as part of a POST request.
    Collection Description
    ClientCertificate Retrieves certification information sent by the client when using secure communication between the web server and the client.
    Cookies Retrieves information stored on a user's computer.
    Form Retrieves information passed by a form that uses the POST method.
    QueryString Retrieves information passed to an ASP page by a query string.
    ServerVariables Retrieves information stored in a server variable.
     
    Server Object
    Property Description
    ScriptTimeout Specifies the amount of time the web server will spend processing an ASP script.
    Method Description
    CreateObject Creates an instance of an object in an ASP page.
    Execute Accesses an ASP page from within another ASP page.
    GetLastError Creates an instance of the ASPError object describing the error that occured.
    HTMLEncode Prevents the client from attempting to process HTML code that is to be processed as plain text.
    MapPath Identifies where a file is stored on the web server.
    Transfer Transfer control from one ASP page to another.
    URLEncode Encodes a URL to allow the URL to be passed from one ASP page to another for processing.
     
    Session Object
    Property Description
    CodePage Specifies the character set used to create the text that makes up the code of an ASP page.
    LCID Sets the local identifier of the code used in an ASP page.
    SessionID Uniquely identifies each current user to the web server.
    Timeout Specifies in minutes the length of time the users's session information is stored on the web server after the last refresh or request.
    Method Description
    Abandon Immediately ends the session for the user and erases the information associated with the session.
    Collection Description
    Contents Holds items added to the Session object using script commands.
    StaticObjects Holds objects added to the Session object using the <OBJECT> tag.
    Event Description
    OnStart Specifies an event that occurs when the web server creaes a new session.
    OnEnd Specifies an event that occurs when a session is abandoned ot times out.
     
    Application Object
    Method Description
    Lock Locks all variables in an application while the value of a variable is being modified.
    Unlock Unlocks all variables in an application
    Collection Description
    Contents Holds items added to the Application object using script commands.
    StaticObjects Holds objects added to the Application object using the <OBJECT> tag.
    Event Description
    OnStart Specifies an event that occurs when the web server starts an application.
    OnEnd Specifies an event that occurs when an application ends.