ASP » Response » Status

The Status property specifies the value of the status line returned by the server.

The Status property specifies the value of the HTTP status line returned by the server This is a three digit number followed by a short description.

Examples

Code:
<%
IPAddress = Request.ServerVariables("REMOTE_ADDR")
If IPAddress <> "208.5.64.223" Then
   Response.Status = "403 Access Forbidden"
   Response.Write Response.Status
   Response.End
End If
%>
 
<HTML>
<HEAD>
</HEAD>
<BODY>
You have accessed this page through the IP Address of 208.5.64.223. </BODY>
</HTML>
Output:
You have accessed this page through the IP Address of 208.5.64.223.
Explanation:

The output assumes that the IP address of the client is 208.5.64.223. Otherwise the output is: 403 Access Forbidden