ASP – Response.Write() and Response.Redirect()

By dorms

If we have the following code:

Response.Write("hello world")
Response.Redirect(”page2.asp”)

For some reason (an asp bug maybe) the redirect wont work.

But if we modify the code as follow:

Response.Redirect("page2.asp")
Response.Write(”hello world”)

Then it will work.

Edited: That’s not 100% true, sometimes it works, sometimes it doesn’t. In either case, if sometime you have a Redirect that is not working, you should keep this in mind.

Leave a Reply