Copied and pasted from a previous post by Karl:
Response.Redirect throws a ThreadAbordException
intentionally. Technically, Response.Redirect calls Response.End() which
throws the exception.
If you specify true as a 2nd parameter (by default it's false),
Response.End() isn't called, and the page is fully processed before being
redirected.
The real solution to your problem is not to swallow exceptions like you are
doing. You really shouldn't ever catch Exception.
Karl
--
http://www.openmymind.net/
graphicsxp wrote:
> Hi,
> I have the following:
> Dim p As String = Server.MapPath("~/Uploads/pdf/test.pdf")
> Response.Redirect(p)
>
> The value of p is correct and the file exists. If I enter manually the
> value of p into my browser address bar, then the pdf file is properly
> opened.
>
> However from the code it doesn't work and although I've added a try
> catch block I still can't see the exception. It says:
>
>
> An exception of type 'System.Exception' occurred in myProject.DLL but
> was not handled in user code.
>
> I'm a bit lost there. Can you help ?
> Thanks
>