469,903 Members | 2,071 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Capturing page errors using Master Pages C#

32
Hi,

I am trying to develop an error handling in our asp.net web app. I'm pretty new to Master pages although the concept of master pages had been completed by someone else & works fine.

What I am trying to achieve is to have some code in the master page (I think this is where it will go) & this will need to handle any errors which occur in the content pages, I'm not quite sure what to do yet if there is an error in the BL or DAL? But, in the app_code folder I have a class (EventLogging.cs) which writes the required error, warning or information to the Event Viewer depending on the information passed to it.

So what I need help with is, how to implement the actual call to the EventLogging.cs - Can I do it in the master page or do I have to do it every time in each content page. If I can do it in the master page (which sound good to me) how can I check to see if an error has occurred. I've spent all afternoon googling & just getting deeper & deeper.

Any help would be appreciated.

Thanks
Janet
Sep 10 '07 #1
1 1461
Frinavale
9,735 Expert Mod 8TB
Hi,

I am trying to develop an error handling in our asp.net web app. I'm pretty new to Master pages although the concept of master pages had been completed by someone else & works fine.

What I am trying to achieve is to have some code in the master page (I think this is where it will go) & this will need to handle any errors which occur in the content pages, I'm not quite sure what to do yet if there is an error in the BL or DAL? But, in the app_code folder I have a class (EventLogging.cs) which writes the required error, warning or information to the Event Viewer depending on the information passed to it.

So what I need help with is, how to implement the actual call to the EventLogging.cs - Can I do it in the master page or do I have to do it every time in each content page. If I can do it in the master page (which sound good to me) how can I check to see if an error has occurred. I've spent all afternoon googling & just getting deeper & deeper.

Any help would be appreciated.

Thanks
Janet
The are errors that occur in your system exceptions?
Have you considered setting up the <customErrors > section in your web.config to redirect to an ASPX page in the case of an error...and then take the appropriate measures to handle the error in that ASPX page...??
Sep 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by lanem | last post: by
7 posts views Thread by sasquatch | last post: by
2 posts views Thread by Argirop | last post: by
2 posts views Thread by n# | last post: by
5 posts views Thread by =?Utf-8?B?UmJydA==?= | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.