Click here to Skip to main content
15,916,215 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: ASP.NET Pin
fjdiewornncalwe11-Dec-12 6:29
professionalfjdiewornncalwe11-Dec-12 6:29 
JokeRe: ASP.NET Pin
jkirkerx11-Dec-12 12:09
professionaljkirkerx11-Dec-12 12:09 
QuestionASP.NET Pin
Member 468595610-Dec-12 19:59
Member 468595610-Dec-12 19:59 
AnswerRe: ASP.NET Pin
Richard MacCutchan10-Dec-12 21:32
mveRichard MacCutchan10-Dec-12 21:32 
AnswerRe: ASP.NET Pin
AmitGajjar11-Dec-12 6:48
professionalAmitGajjar11-Dec-12 6:48 
QuestionResponse.Redirect behavior Pin
AnalogNerd10-Dec-12 9:11
AnalogNerd10-Dec-12 9:11 
AnswerRe: Response.Redirect behavior Pin
David Mujica10-Dec-12 10:01
David Mujica10-Dec-12 10:01 
GeneralRe: Response.Redirect behavior Pin
AnalogNerd10-Dec-12 10:16
AnalogNerd10-Dec-12 10:16 
I'm beyond mortified that I didn't think of that. Especially since after posting the question I ran the code to check something else, but putting a break point there just never occurred to me. Sigh | :sigh:

Ok, so thanks to David's suggestion I have an answer.

As it is written that code will throw an exception on the Response.Redirect with the following message:
Quote:
{Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}
However, it still does the redirect after going through the finally block.

Changing the Response.Redirect to
C#
Response.Redirect("SomePage.aspx", false);

will save it from throwing the exception, but will still run the code in the finally and any code after it and then will do the Redirect.

Live and learn.

modified 11-Dec-12 9:26am.

AnswerRe: Response.Redirect behavior Pin
Shameel10-Dec-12 21:28
professionalShameel10-Dec-12 21:28 
AnswerRe: Response.Redirect behavior Pin
AmitGajjar11-Dec-12 6:54
professionalAmitGajjar11-Dec-12 6:54 
AnswerRe: Response.Redirect behavior Pin
ZurdoDev12-Dec-12 4:36
professionalZurdoDev12-Dec-12 4:36 
GeneralRe: Response.Redirect behavior Pin
AnalogNerd12-Dec-12 4:46
AnalogNerd12-Dec-12 4:46 
QuestionERROR while updating image in database Pin
Ani199110-Dec-12 6:18
Ani199110-Dec-12 6:18 
GeneralRe: ERROR while updating image in database Pin
jkirkerx10-Dec-12 10:37
professionaljkirkerx10-Dec-12 10:37 
GeneralRe: ERROR while updating image in database Pin
Ani199110-Dec-12 21:15
Ani199110-Dec-12 21:15 
GeneralRe: ERROR while updating image in database Pin
Richard Deeming11-Dec-12 0:54
mveRichard Deeming11-Dec-12 0:54 
GeneralRe: ERROR while updating image in database Pin
jkirkerx11-Dec-12 7:26
professionaljkirkerx11-Dec-12 7:26 
Questionmaking a class with streamreader thread safe - perhaps using monitor or a singleton Pin
jkirkerx9-Dec-12 11:45
professionaljkirkerx9-Dec-12 11:45 
GeneralRe: making a class with streamreader thread safe - perhaps using monitor or a singleton Pin
jkirkerx9-Dec-12 16:14
professionaljkirkerx9-Dec-12 16:14 
QuestionDisplay Images from a database in a tile view Pin
Member 94655649-Dec-12 5:42
Member 94655649-Dec-12 5:42 
AnswerRe: Display Images from a database in a tile view Pin
Ali Al Omairi(Abu AlHassan)10-Dec-12 2:23
professionalAli Al Omairi(Abu AlHassan)10-Dec-12 2:23 
Questionlinq connection in asp.net Pin
JonBrynjar8-Dec-12 3:58
JonBrynjar8-Dec-12 3:58 
AnswerRe: linq connection in asp.net Pin
AmitGajjar11-Dec-12 7:00
professionalAmitGajjar11-Dec-12 7:00 
QuestionChange root path Pin
#realJSOP8-Dec-12 3:40
professional#realJSOP8-Dec-12 3:40 
AnswerRe: Change root path Pin
Richard Deeming10-Dec-12 1:35
mveRichard Deeming10-Dec-12 1:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.