?
Solved

response.redirect

Posted on 2004-04-14
7
Medium Priority
?
279 Views
Last Modified: 2010-04-15
how can i response.redirect after doing a response.flush? i keep getting cannot redirect after http headers has been send?

thanks

alain
0
Comment
Question by:alain123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10826541
this is correct because the headers are used to do the redirect ...

you could write out javascript to do the redirect
0
 
LVL 1

Author Comment

by:alain123
ID: 10826612
hmm. the redirect needs to be done on the server side..
0
 
LVL 9

Expert Comment

by:msdixon
ID: 10827885
Response.Write("<script language=\"javascript\">document.location = 'yourUrlHere.aspx'</script>");
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:AdrianJMartin
ID: 10827912
use a javascript to redirect the browser, when you use the Server.Redirect, asp.net actually post a header to the browser to request that the browser redirects to another location:-

<META HTTP-EQUIV="Refresh" CONTENT="0;URL=rediretedpage.htm">  this is in the headwer section of response.

technically you should include the full url on the internet as some browsers can decide not to handle the redirect based on securty settings.

the following javascript can be written to the response at any time will be actioned as soon as the browser parses it

<script language=javascript>
<!--
location.replace("page1.htm")
//-->
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 750 total points
ID: 10828064
yes basically you write out the javascript from the server to tell the broswer to redirect ...
0
 
LVL 9

Expert Comment

by:msdixon
ID: 10838075
isn't that what i said? how is that different?
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10838083
its what I had said previously as well ...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question