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?
 
Can you not add the message to the querystring and then call up the customer
erro page?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top