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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Header Error

Status
Not open for further replies.

vincentius

Programmer
Feb 11, 2002
17
0
0
ID
Hi All,

I try to use response.redirect but why does this error happen?

-- ERROR --
Response object error 'ASP 0156 : 80004005'

Header Error

/wtsrv/reportwwmm/rep_ww.asp, line 251

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.

Why?

Thanks,

Vincent.
 
This happens because your Response.redirect statement is under your <html>. There are two solutions for you:

1. Move your code to above the <html>.
2. At the very top of your page put <Response.buffer=true%>.

Option 2 will buffer your page, and not write anything to the client until the entire page has finished executing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top