Response.Redirect inside a Try Catch block

C

Craig

Can you put a Response.Redirect inside a Try Catch block?

I think you will get a thread Abored Error, true?
 
V

vMike

Craig said:
Can you put a Response.Redirect inside a Try Catch block?

I think you will get a thread Abored Error, true?
Can't have one in a try catch. What you can do is test for something withing
the try catch and set it for true or false and then after try check that
value as follows

redirectvar = false
try
set redirectvar to true or false depending on conditions
catch
set redirectvar to true or false depending on conditions
end
if redirectvar = true then redirect

Mike
 
C

Craig

Thanks that is what I am doing!


vMike said:
Can't have one in a try catch. What you can do is test for something
withing
the try catch and set it for true or false and then after try check that
value as follows

redirectvar = false
try
set redirectvar to true or false depending on conditions
catch
set redirectvar to true or false depending on conditions
end
if redirectvar = true then redirect

Mike
 

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

Top