Folks,
My ASPX page uses a custom user control. What happens here is that
when a runtime error occurs in the ASPX page, the error is caught in
the error handler and then strangely, the execution continues to the
custom user control code and it blows there because of the error
occured initially in the ASPX page. When it blows it displays as
unhandled error even though I have try catch in my ASPX page and in
the custom user control.
Is there a way to stop execution if an error occurs in the Page_Load
method and return the contents gathered so far back to the client
(along with the error)?
I tried Response.End and it returns an emppty screen to the client. I
wanted to display whatever has been processed until the point where
the error occured. Pls note this works fine for normal ASPX page but
when I use a custom user control in my ASPX page then the execution
continues to the custom user control code even after an error occured
and caught in my ASPX page's try catch block.
Any thoughts pls?