one custom error page that handles all exceptions

  • Thread starter Thread starter feng
  • Start date Start date
F

feng

I want to have a custom error page that I can always call
and pass parameters to it when I hit runtime exceptions.
For instance, in my code behind, I have a try-catch block.
When I catch an exception, the exception object contains a
collection of messages to be displaied. I would like to be
able to call a common exception handling page and somehow
pass along the exception collection. Then the exception
page will retrive the messages from the collection and
display it to the user's browser.

Could someone tell me how to achieve this? Some sample
code would be even better.

Thanks a million.

Feng
 
Just an idea but.....
throw it (the error) to a session item, then in your webconfig specify the
page, in the customErrors tag, and have this page look in the session for a
value?
 
Back
Top