Solved

response.redirect

Posted on 2004-04-14
7
271 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
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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 250 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Parameter transfer to cristal report 3 52
Image(2) 3 26
cs.Designer Issue 2 18
Visual Studio 2013 debugging 2 19
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now