The ASP Server Object

The Server object makes us available the methods and properties of our server ( IIS ).

Syntax :|method

Properties Description
 ScriptTimeout An integer which specifies time in seconds until which the script can run after that the server aborts the script and displays an error message. 


Methods Description
CreateObject Creates an instance of the object ( a component, application or a scripting object ). The component can be instantiated by giving its CLSID or ProgID in the Server.CreateObject method e.g. Server.CreateObject ("MSWC.MyInfo").
Execute Executes the given .asp page and then returns the control to the page who called the method. Very useful method which can be used to execute another .asp page without leaving the current page and then control is passed back to the calling page.
GetLastError Returns an ASPError object which can be used to get information about the last error occured in the ASP script.
HTMLEncode Provides HTML encoding to a given string. All non-legal HTML characters are converted to their equivalent HTML entity e.g. "<" is converted to &lt; .
MapPath Maps the specified virtual or relative path into physical path of the server.
Transfer Transfers the control of the page to another page specified in the URL. Note that unlike Execute, control of the page is not returned to the page calling the Server.Transfer method.
URLEncode Provides URL encoding to a given string e.g. Server.URLEncode ("") returns http%3A%2F%2Fwww%2Epsacake%2Ecom.

Back To Top
© 1998 - 2024
Version 7.21 | Advertise on this site