Display the error on a custome error page

  • Thread starter Thread starter KJ
  • Start date Start date
K

KJ

Alright,

I'm trying to display Ex.Message on a custom error page. Here is what
I did.

When an error occured I caught the error and saved it in a session
variable and when the page redirected to the custom error page I read
the session variable and displayed the message. But this does not work
all the time for some reason. Is there a better way to display the
error on a custom error page? I do not want to create error pages for
each type of error because I don't think there will be any. lol But if
I do get one I want to display it on the error page. What is the best
way to do this? Thanks
 
Do you try to save only the string Ex.Message or the full exception object
Ex?
Do you use GetLastError() ? Where do you try to save it
Page/Global.asax/HttpModule ?
 
I'm trying to save only Ex.Message. I'm saving it in the Page. I'm I
doing something wrong?
 
Back
Top