The Asp Server Object can store user defined variables . The variables stored in the Server object are common to all the web pages on the web server. This enables the value to be the same for all the users on all the pages. The Server object contains only one property, ScriptTimeOut. You can use the property to set the time for which a script is allowed to execute by a server , before it is stopped. For Example, you can specify :-
<% Server.ScriptTimeout = 50 % >
The previous statement indicates it will allow scripts to run for 50 seconds. The Server will Terminate scripts after 50 seconds and display an error message This property is useful when a Script is executing a loop with very high values or waiting for resource to be free. By default the for Scripttimeout property is set to 90 seconds.
<% Server.ScriptTimeout = 50 % >
The previous statement indicates it will allow scripts to run for 50 seconds. The Server will Terminate scripts after 50 seconds and display an error message This property is useful when a Script is executing a loop with very high values or waiting for resource to be free. By default the for Scripttimeout property is set to 90 seconds.
ASP SERVER OBJECT METHODS
Method | Description |
CreateObject | Creates an instance of an object |
Execute | Executes an .asp files |
URLEncode | Converts a string into the proper format for HTTP paramater passing with escape characters |
HTMLEncode | Convers HTML string characters to be displayed on a browser instead of being interpreted |
MapPath | convert a virtual path to phyiscal path |
Transfer | Transfer control to another ASP page. It does not create a new object context |
GetLastError | Returns an instance of the ASPError object |