server.transfer after response.flush

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have an aspx page, i do a response.write ( some html)
then response.flush(

an error occurs (and on my webconfig i have <customErrors mode="On" defaultRedirect="./Error.aspx" >

Then i do a server.transfer to the page, in order to pass the last http context with the error ob

and on my Error.aspx.cs I have to build dinamically my page

The problem: The html flushed stays on the second page, i cannot clean my page anymore.

If you have any idea how to do this, please let me know

tes
www.askmars.com
 
Flush forces the HTTP runtime to send already accumulated output to the
client. If there are situations when you need to discard all accumulated
input, don't do Flush() until the point where you are sure no more errors
will occur.

tesn said:
i have an aspx page, i do a response.write ( some html)
then response.flush()

an error occurs (and on my webconfig i have <customErrors mode="On"
defaultRedirect="./Error.aspx" > )
 
I think I'd combine the waiting message with a redirect to the same page.

tesn said:
hello Dmitry, what happens in the case that you need to flush() half a
page for a waiting message for example? how would you habdle that situation?
thanks,

tesn
http://www.askmars.com

----- Dmitriy Lapshin [C# / .NET MVP] wrote: -----

Flush forces the HTTP runtime to send already accumulated output to the
client. If there are situations when you need to discard all accumulated
input, don't do Flush() until the point where you are sure no more errors
will occur.

tesn said:
i have an aspx page, i do a response.write ( some html)
then response.flush()
mode="On"
defaultRedirect="./Error.aspx" > ) http
context with the error obj clean my
page anymore.
 
Back
Top