473,408 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Display the error on a custome error page

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
Nov 18 '05 #1
3 1586
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 ?

--
Daniel Fisher(lennybacon)
MCP ASP.NET C#
Blog: http://www.lennybacon.com/
"KJ" <kl******@hotmail.com> wrote in message
news:d8**************************@posting.google.c om...
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

Nov 18 '05 #2


I'm trying to save only Ex.Message. I'm saving it in the Page. I'm I
doing something wrong?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Can you not add the message to the querystring and then call up the customer
erro page?

"Kyle Johnson" wrote:


I'm trying to save only Ex.Message. I'm saving it in the Page. I'm I
doing something wrong?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mukund Patel | last post by:
Hi friends, I have implemented custom error handling at page level and application level. If there is any syntax error in my aspx class file it will redirect to error page when I run the page....
0
by: Rhys666 | last post by:
OK, an issue I've come across before, but never found a cause for or resolution of, has decided to become the bane of my life again with ASP.Net Custom Error Pages. Basically, my web application...
2
by: Kim | last post by:
I've set the "defaultRedirect" attribute of the <customErrors> tag in web.config file to the filename of the custom error page. However, ASP.NET does not display this page whenever an unhandled...
3
by: roger31 | last post by:
My problem is to provide Customized smart navigation for any page in my website. I plan to divide my pages into sections and when I navigate from one page to another I would like any section within...
1
by: serge calderara | last post by:
dear all, i am a bit confused on the way custom error are handling and occurs. First of all I have understand that customer error is used to defined more user friendly message to my end user and...
1
by: jack | last post by:
Hi all i have just read and tried custome validation and its working fine the validation checks length of the field and returns a message if in valid is just wanted to know where all this...
3
by: c676228 | last post by:
Hi everyone, I have a piece of code in sales.aspx.vb like this: Protected WithEvents Message As System.Web.UI.WebControls.Label Try ... ChartImage.ImageUrl = "ChartGenerator.aspx?" + DataStr +...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.