HttpHandler Progress Indicator

  • Thread starter Dale Ragan via .NET 247
  • Start date
D

Dale Ragan via .NET 247

(Type your message here)

--------------------------------
From: Dale Ragan

I am running into a problem with an HttpHandler that I have builtto show a progress image on the page getting processed. I amusing Response.Flush and as you know you cannot have aResponse.Redirect after you have flushed the buffered content tothe client. You get the cannot modify cookies after the headerhas been sent exception. I know of some ways to correct this bygoing into the individual pages and taking out theResponse.Redirect instances and replacing them with anothermeans of redirecting the user. The question I have is, if thereis a way to capture the Response.Redirect in my HttpHandler andhandle it there instead of recoding every page that will need aprogress indicator.

Thanks in advance for any input.

Dale
 
R

Rick Strahl [MVP]

Dale,

I don't think that would work any way you try this because a Redirect()
requires that HTTP Headers are sent to the client. If you're flushing and
you have previously created output the headers have already gone to the
client.

One thing you could do is dynamically add some JavaScript to the page when
you are ready to rediect. The script can change the location of the current
page. IOW, you generate some additional HTML that has this script code
inline with the body of the page which will then run as it gets to the
browser...

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
http://www.west-wind.com/wwThreads/
----------------------------------
Making waves on the Web


(Type your message here)

--------------------------------
From: Dale Ragan

I am running into a problem with an HttpHandler that I have built to show a
progress image on the page getting processed. I am using Response.Flush and
as you know you cannot have a Response.Redirect after you have flushed the
buffered content to the client. You get the cannot modify cookies after the
header has been sent exception. I know of some ways to correct this by
going into the individual pages and taking out the Response.Redirect
instances and replacing them with another means of redirecting the user.
The question I have is, if there is a way to capture the Response.Redirect
in my HttpHandler and handle it there instead of recoding every page that
will need a progress indicator.

Thanks in advance for any input.

Dale
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top