Response.redirect - The page has moved to here

L

Lupus

Hi there!

I have some strange behavior in a ASP VB.NET application.

I've used response.redirect many times in different pages, and it
works like a charm. However in a new page I'm making, the browsers
behavior is different than in my previous pages.

Internet explorer just gives a blank screen. Firefox shows a text "The
page has moved to here"...

Anyone knows why the browsers may act this way instead of just
redirecting ?
 
C

Chris Auer

Hi there!

I have some strange behavior in a ASP VB.NET application.

I've used response.redirect many times in different pages, and it
works like a charm. However in a new page I'm making, the browsers
behavior is different than in my previous pages.

Internet explorer just gives a blank screen. Firefox shows a text "The
page has moved to here"...

Anyone knows why the browsers may act this way instead of just
redirecting ?

Show friendly messages on in IE? Those messages are coming from the
web server not code.
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Lupus said:
Hi there!

I have some strange behavior in a ASP VB.NET application.

I've used response.redirect many times in different pages, and it
works like a charm. However in a new page I'm making, the browsers
behavior is different than in my previous pages.

Internet explorer just gives a blank screen. Firefox shows a text "The
page has moved to here"...

Anyone knows why the browsers may act this way instead of just
redirecting ?

A redirect actually is a web page that contains that text. It also
contains a redirect value in the http header that tells the browser to
get another page instead of showing the redirection page.

If the value is not written to the header for some reason, you will se
the redirection page instead. This might also happen if you redirect to
the same page, which would otherwise send the browser into an eternal loop.

Where are you redirecting to, and what else do you do in the page before
calling the Redirect method?
 
G

George Ter-Saakov

I believe it's happening if response from the server has more than just a
header with redirect information.
for example if you outputted the whole HTML page and then did a redirect.
Just make sure that you clear out the buffer

George.

 
G

George Ter-Saakov

I believe it's happening if response from the server has more than just a
header with redirect information.
for example if you outputted the whole HTML page and then did a redirect.
Just make sure that you clear out the buffer

George.

 
L

Lupus

I believe it's happening if response from the server has more than just a
header with redirect information.
for example if you outputted the whole HTML page and then did a redirect.
Just make sure that you clear out the buffer

George.

Thanks for all your responses!

This is what I'm actually doing. I'm working on a simple file
management system. The user is at default.aspx, showing a list of
files + a file upload form. The form action is process.aspx. The
programming in process.aspx saves the file (in my case in a SQL table)
and should redirect back to default.aspx.

I've done this kind of thing many times, so I'm a bit surprised (and
my boss too, due to the amount of hours I'm spending on this) why this
isn't working...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top