[thelist] Can I do this in ASP?

Means, Eric D eric.d.means at boeing.com
Tue Apr 9 11:53:01 CDT 2002


> <form action=<%= Request.ServerVariables("SCRIPT_NAME") %>?mode=submit
> method="post">
> ...form stuff
> <input type="submit">
> </form>
>
> <%
>
> If blnSubmit = True Then
> 	' ok to enter to DB
> 	Response.Redirect("Error.asp")
> Else
> 	Response.Write(Err.Number & " " & Err.Description)
> End If
>
> %>

You cannot do a Response.Redirect if you've written anything to the browser.
The reason for this is that the Response.Redirect is managed by an HTTP
header sent to the browser, and you all of the headers have to be sent
first, before any actual HTML can be.



More information about the thelist mailing list