problem with response.redirect 
Author Message
 problem with response.redirect

i creat a web form (htm file) who submit to an ASP vbs page.
this is my asp page code. here:


<%
dim erreur
erreur=0

if Request.Form ("titre_du_document")="" then erreur=1
if Request.Form ("demandeur")="" then erreur=1
if Request.Form ("telephone")="" then erreur=1
if Request.Form ("PROVENANCE")="" then erreur=1
if Request.Form ("unite_administrative")="" then erreur=1
if Request.Form ("personne_ressource")="" then erreur=1
if Request.Form ("delai_de_livraison")="" then erreur=1
if Request.Form ("date")="" then erreur=1

response.write erreur

if erreur=1 then Response.Redirect("incorrect.htm")

%>

<HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>

and then this error occur ==>

Response object error 'ASP 0156 : 80004005'

Header Error

/communications/traduction/facteur.asp, line 23

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

can someone help ?
Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect
i creat a web form (htm file) who submit to an ASP vbs page.
this is my asp page code. here:


<%
dim erreur
erreur=0

if Request.Form ("titre_du_document")="" then erreur=1
if Request.Form ("demandeur")="" then erreur=1
if Request.Form ("telephone")="" then erreur=1
if Request.Form ("PROVENANCE")="" then erreur=1
if Request.Form ("unite_administrative")="" then erreur=1
if Request.Form ("personne_ressource")="" then erreur=1
if Request.Form ("delai_de_livraison")="" then erreur=1
if Request.Form ("date")="" then erreur=1

response.write erreur

if erreur=1 then Response.Redirect("incorrect.htm")

%>

<HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>

and then this error occur ==>

Response object error 'ASP 0156 : 80004005'

Header Error

/communications/traduction/facteur.asp, line 23

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

can someone help ?
Thank



Sun, 09 Feb 2003 03:00:00 GMT  
 problem with response.redirect

"Yannick Brub" wrote ...

Quote:
> i creat a web form (htm file) who submit to an ASP vbs page.
> this is my asp page code. here:

<snip>

Quote:
> response.write erreur

> if erreur=1 then Response.Redirect("incorrect.htm")
<snip>
> The HTTP headers are already written to the client browser. Any HTTP
> header modifications must be made before writing page content.

<advice type="friendly">
a) This is an ASP question, and would have been better asked / answered in
microsoft.public.inetserver.asp.general
b) It's been asked over there many, many times - try a search of Deja
</advice>

The error message is telling you that you've already started sending HTML to
the client - either turn buffering on and then Response.Clear before the
re-direct, or simply remove the Response.Write erreur, or move it to after
the redirect...

hth hand

Adam



Sun, 09 Feb 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. problem with response.redirect and forms

2. Style Sheet problem with response.redirect

3. problem with response.redirect

4. Problem with Response.Redirect vs. frames

5. Response Redirect doesn't Work - No me funciona Response Redirect

6. Response.Redirect + Netscape Browser + StyleSheets = Problem!

7. Response.Redirect problem...

8. Response Redirect problem

9. Response.Redirect problem

10. Response.redirect problem

11. ASP problem: response.redirect

12. Response.Redirect problem

 

 
Powered by phpBB® Forum Software