what does this really do?

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

Guest

hey all,

i was wondering what the true/false really does in the
response.redirect("default.aspx", false)?

thanks,
rodchar
 
hey all,

i was wondering what the true/false really does in the
response.redirect("default.aspx", false)?

thanks,
rodchar

It tells the code whether it should keep running to completion after
redirecting the client (run the lines after the Response.Redirect
statement). You can tell the code to keep running the lines after
Response.Redirect, even after the client has received the 302 response for
the redirect. I've never done it for this reason myself, but this
argument comes in very handy if you are doing a Redirect within a
try...catch. By default it would throw an exception to abort the current
thread (which is usually ignored by the framework), but if inside a
try...catch of yours, the exception would get caught by your try..catch
and cause you to think an error happened, when really it's just part of
normal processing (it's how a redirect 'normally' works)...
 
thank you very much. i appreciate it.
rodchar

Craig Deelsnyder said:
It tells the code whether it should keep running to completion after
redirecting the client (run the lines after the Response.Redirect
statement). You can tell the code to keep running the lines after
Response.Redirect, even after the client has received the 302 response for
the redirect. I've never done it for this reason myself, but this
argument comes in very handy if you are doing a Redirect within a
try...catch. By default it would throw an exception to abort the current
thread (which is usually ignored by the framework), but if inside a
try...catch of yours, the exception would get caught by your try..catch
and cause you to think an error happened, when really it's just part of
normal processing (it's how a redirect 'normally' works)...
 
Hi Craig,

I am developing an asp.net application using c# and asp.net 2.0 beta 2. I
started developing this page usign beta1. In beta 1 I have written some code
in Page_LoadComplete(object sender, EventArgs e) events of page. It was
working fine. But after I installed beta 2.0 Page_LoadComplete events is not
firing at all. Can u guide me how can I achieve this goal?

Thankx in advance.
Shailesh.
 

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

Similar Threads


Back
Top