Response.Status property

Sets the HTTP response status.

Usage

Response.Status= status

Details

This property sets the HTTP status code, which reports the success of the page to the client. If not specified, the status is 200 (500 if an error occurs).

401 Unauthorized is useful for forcing a logon when Request.ServerVariables collection is empty.