Monday, July 30, 2012

ThreadAbortException Occurs If You Use Response.Write

Thread exception occurs if you use
Response.Redirect ("Demo.aspx");
Cause:The Response.Redirect method ends the page execution and shifts the execution to the Application_EndRequest event in the application's event pipeline. The line of code that follows Response.End is not executed.

This problem occurs with: Response.End and  Server.Transfer also.

To fix this issue use
Response.Redirect ("Demo.aspx", false);

Also read this article:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;312629

No comments:

Post a Comment

How to upload app to macOS

1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...