ASP ServerObject


The Server object is used to access properties and methods on the server.


Examples

Try it Yourself - Examples

What is the time this file was last modified?
Detect the last modification time of a file.

Open and read a text file
Open the file "Textfile.txt" for reading.

Self-made click counter


Server Object

The ASP Server object is used to access properties and methods on the server. Its properties and methods are described below:

Properties

Property Description
ScriptTimeout Sets or returns the maximum amount of time (in seconds) a script can run before it is terminated.

Methods

Method Description
CreateObject Creates an instance of an object.
Execute Executes an ASP file from within another ASP file.
GetLastError() Returns an ASPError object that describes the error condition that occurred.
HTMLEncode Applies HTML encoding to a specified string.
MapPath Maps a specified path to a physical path.
Transfer Sends (transfers) all information created in one ASP file to another ASP file.
URLEncode Applies URL encoding rules to a specified string.

Other Extensions