Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=120100023

Request Object

Request Object

Request object of ASP is related to retrieving data by the server from the client.

Methods

Method Description
BinaryRead Retrieve the data part of a POST request by the server from the client

Properties

Property Description
ClientCertificate (collection) Retrieve the field values of the client certificate which is sent in the HTTP request.
Cookies (collection) Retrieve the values of cookies which is sent in the HTTP request.
Form (collection) Retrieve the element values of a form which is sent in the body of HTTP request with a form using the POST method.
QueryString (collection) Retrieve the variable values of  query string which is sent in the HTTP request.
ServerVariables(collection) Retrieve the values of predetermined environment variable.
TotalBytes A read only property to specify the total number of bytes sent by the client in the body of the HTTP request

Remarks

  • For an unknown variable of collection of a Request, The Request object returens EMPTY
  • The collection name can be omitted by directly calling the variable as the variable of the function. i.e. Request(variable)
  • If no collection name is specified, the web server searches the variable name in the collections in the order of: QueryString, Form, Cookies, ClientCertificate and ServerVariables and only the value of first instance will be returned
  • The methods and properties of ASP request object can be grouped into
    • ReadOnly property: TotalBytes;
    • Data Stream: BinaryRead;
    • Data Field/Collection: QueryString; Form; Cookies; ClientCertificate; ServerVariables.

 

 

Link:http://output.to/sideway/default.asp?qno=120100024

Server Object

Server Object

Server object of ASP is related to the manipulation of utility functions or server tasks on the server.

Methods

Method Description
CreateObject Create an instance of an object from a component on the server.
Execute Execute an ASP file similar to a procedure call
GetLastError Get the last error from the ASPError that describes the error condition of processing the script in an ASP file
HTMLEncode Encode and convert the specified string according to the HTML encoding rules
MapPath Map and Convert the specified path including virtual path on the server, or relative path relative to the page into the corresponding physical path.
Transfer Transfer all current state information to another ASP file for continue processing by the new ASP file according to all transferred state information similar to Response.Redirect method.
URLEncode Encode and convert the specified string according to the URL encoding rules including escape characters .

Properties

Property Description
ScriptTimeout Set the length of time out period that allowed the script to run on the server.

Remarks

The methods and properties of ASP response object can be grouped into

  • File Processing:
    • Execute a file: Execute;
    • Execute a file with state information: Transfer;
  • Object: CreateObject
  • Utility Function
    • Error detection: GetLastError;
    • Code Conversion: HTMLEncode; URLEncode;
    • File system: MapPath.
    • File execution: ScriptTimeout

 

 

Link:http://output.to/sideway/default.asp?qno=120100025

Application Object

Application Object

Application object of ASP is related to the manipulation of information about entire web application for all clients on the server.

Methods

Method Description
Contents.Remove Remove or delete an item from the Contents collection of Application object.
Contents.RemoveAll Remove or delete all items from the Contents collection of Application object.
Lock Lock the properties of Application object by only one client at a time for preventing other clients from modification.
Unlock Unlock or release the properties of Application object by the only one client at a time for allowing other clients to modify

Properties

Property Description
Contents (Collection) Add or set the value of an item of the Contents collection of Application object through script commands.
StaticObjects (Collection) Collection of all objects added to the session through the <OBJECT> tag within the Application scope.

Events

Event Description
Application_OnEnd Event occurs on the end of the Application after all the Session_OnEnd event. Available objects are Application Object and Server Object built-in objects.
Application_OnStart Event occurs on the start of the Application before the first Session_OnStart event. Available objects are Application Object and Server Object built-in objects.

Remarks

  • All items in the collections of Application object is available within the scope of application.

  • An object instance of a component can be assigned to an item of a Contents Collection through the Server.CreateObject method with the Set keyword.

  • And an embedded object can also be assigned to an item of a StaticObjects Collection through the <OBJECT> tag

  • When store an object instance in an Application object, the threading model of objects should be considered because the threading model of objects have a significan impact on the performance and security context of the object.

  • But all built-in objects cannot be assigned to neither a Content Collection nor a StaticObjects Collection.

  • Besides, an array can also be assigned to an item of a Contents Collection in the form of a collection, but the elements of the stored array in the Contents Collection cannot be manipulated as an ordinary array directly because the array is stored as a collection.

  • The methods and properties of ASP application object can be grouped into

    • Setup/Event: Application_OnEnd; Application_OnStart
    • Variable Control: Lock; Unlock
    • Object: StaticObjects
    • Variable:
      • Add/Set: Contents;
      • Remove: Contents.Remove; Contents.RemoveAll
Previous Month  JAN  2012  Next Month
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
293031

Previous Month  APR  2012  Next Month
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930

Sideway BICK Blog

27/01


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013