Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Response.Redirect Method 1

Status
Not open for further replies.

Learyist

Programmer
Apr 25, 2002
1
US
I am working on a log in page and am trying to reload the log in page if the Password is not correct by using the Response.Redirect method. I am getting this error message.
Anyone have any helpful ideas?

Response object error 'ASP 0156 : 80004005'

Header Error

/Fab_Site/LogIn.asp, line 26

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
 
You have probably already sent some (html) output to the browser...

use:

Code:
<%
response.buffer = true
...do your stuph...
if IWantToRedirect then
     response.clear
     response.redirect(&quot;TheOtherPage.asp&quot;)
end if
%>
This is not a bug - it's an undocumented feature...
;-)
 
[tt]Make sure the page that checks for the login is not writting anything to the browers already.
You can't redirect if you are trying to display something.[/tt]




[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top