473,473 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Capturing page errors using Master Pages C#

32 New Member
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 1593
Frinavale
9,735 Recognized Expert Moderator Expert
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

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

Similar topics

0
by: lanem | last post by:
I am working on an ASP.NET 2.0 website. I have a default.aspx page as the homepage. I have one master page that is used by all my pages. I also have a folder, called Private, with a default.aspx...
7
by: sasquatch | last post by:
Hi, I've a a site with nested master pages and content pages. I tried using a theme with a stylesheet in the app_themes directory referencing it in the web.config file from a pages tag theme...
1
by: Alan Silver | last post by:
Hello, I have a site that uses master pages. To enable simple switching of the master page, and to avoid potential inconsistencies between pages, I set the master page file in the web.config...
13
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas?...
2
by: news.sbcglobal.net | last post by:
I hope I can explain this well enough to understand. I have a master page that is used by almost all of the pages in my site. On the master page is a table. In one of the cells in this table, I...
8
by: JT | last post by:
Hi, I have done a fair amount of style editing inline in ASP. I'm now using VS 2005 with a standard web project (not Web Application Project). This is my first foray into CSS in a style sheet...
2
by: Argirop | last post by:
I have a page Default.aspx. Its first line is the following: <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs"...
2
by: n# | last post by:
I have an old existing website with a Header/ Left Hand Menu and a iframe as the main body content, adjacent to the menu. So for every click on the menu item, I used to load a aspx page on the...
5
by: =?Utf-8?B?UmJydA==?= | last post by:
There is a lot of good material related to using Master Pages for formatting controls and putting common design elements on multiple pages. I have VB.NET code that is common to all of my pages...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.