Name
ScriptTimeout
Synopsis
intvar = Server.ScriptTimeout
Returns an Integer containing the length, in milliseconds, a request is allowed to run before timing out.
Parameters
-
intvar
An Integer variable that receives the script timeout value.
Example
This code example declares an integer variable, sets the ScriptTimeout value to 120 seconds, assigns the ScriptTimeout property value to the variable, and then sets the text property of the Message label to the value of the variable:
Sub Page_Load( ) Dim Timeout As String Server.ScriptTimeout = 120 Timeout = CStr(Server.ScriptTimeout) Message.Text = "The current ScriptTimeout value is " & _ Timeout & ".<br/>" End Sub
Notes
You can use this property to extend or reduce the timeout value in order to allow longer-running processes time to complete, or you can use ScriptTimeout to reduce the overhead associated with inefficient processes by terminating them before completion. The default for this value is set to an extremely high number so that a script will not time out by default. This is for backward compatibility with classic ASP.
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.