Name
Status —
Response.Status(
strStatusDescSetting
)
Synopsis
Specifies the HTTP status line that is returned to the client machine from the web server.
Parameters
-
strStatusDescSetting
The
strStatusDescSetting
is a string value containing a three-digit status code that indicates the status of the HTTP request and a short explanation of the status code.The possible values of the
strStatusDescSetting
parameter are described in the current HTTP specification[1] and fall into the following high-level categories:-
1xx
The 100 range is set aside for sending information-only response statuses to the client.
-
2xx
The 200 range is set aside for sending successful response statuses to the client.
-
3xx
The 300 range is set aside for redirection of the client. This status range should be used for requested pages that have been moved temporarily or permanently.
-
4xx
The 400 range is set aside for sending notices of client error to the client. For example, you have undoubtedly seen the
404
Not
Found
error status sent back to your browser when you attempt to navigate to a page that has been moved or that does not exist.- 5xx
The 500 range is set aside for sending notices of server error to the client. For example, attempts to reach pages on a server that is unable to handle the request due to temporary overloading or server maintenance could result in the response status
503 Service Not Available
.
-
Example
<% ' The following code sets the Status property of the ' Response object to 404 Not Found. Unless ...
Get ASP in a Nutshell, 2nd Edition 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.