Response.Redirect inside a Try Catch block

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

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

I think you will get a thread Abored Error, true?
 
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
 
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
 
Back
Top