473,406 Members | 2,705 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,406 software developers and data experts.

Inline alternitive to Page_Error?

Is there anyway to inline Page_Error type global error handling in an
ASP.Net webpage? Currently I work on a very large web system where the
entier web front end is contained in a single project file. I would like to
have inline Page_Error methods for certain pages, particularly some XML
exchanges I have in place for some AJAX functionality. Thx for any info,

Carlo
Sep 1 '06 #1
3 1252
How would *inline page errors improve your situation? I marked inline page
errors because it doesn't really make sense to describe a page error as
inline. These are events that fire when an unhandled exception occurs at the
page level.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Carlo Razzeto" <cr******@hotmail.comwrote in message
news:ek*************@TK2MSFTNGP03.phx.gbl...
Is there anyway to inline Page_Error type global error handling in an
ASP.Net webpage? Currently I work on a very large web system where the
entier web front end is contained in a single project file. I would like
to have inline Page_Error methods for certain pages, particularly some XML
exchanges I have in place for some AJAX functionality. Thx for any info,

Carlo

Sep 3 '06 #2
"Alvin Bruney [MVP]" <www.lulu.com/owcwrote in message
news:um****************@TK2MSFTNGP05.phx.gbl...
How would *inline page errors improve your situation? I marked inline page
errors because it doesn't really make sense to describe a page error as
inline. These are events that fire when an unhandled exception occurs at
the page level.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
I was thinking in terms of how, for instance, PHP allows you to do the
following at the top of your code file:

register_exception_handler( 'functionName' );

Once you have done this, while this page executes any unhandled exceptions
will then be sent to that method before being passed up the stack. At that
point the programmer could, for instance, based on the exception return an
appropriate error response through the defined XML structure. This is what I
was hoping to do in .Net. I can't do this in Page_Error as defined in
Global.asax because this would, obviously, create a situation where an
invalid response was being sent for all but the one page the method was
coded to handle.

Carlo
Sep 5 '06 #3
I was referring to the Page_Error or Application_Error methods defined in
Global.asax which allows a programmer to define a global error handling
routine.

Carlo
"Alvin Bruney [MVP]" <www.lulu.com/owcwrote in message
news:um****************@TK2MSFTNGP05.phx.gbl...
How would *inline page errors improve your situation? I marked inline page
errors because it doesn't really make sense to describe a page error as
inline. These are events that fire when an unhandled exception occurs at
the page level.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"Carlo Razzeto" <cr******@hotmail.comwrote in message
news:ek*************@TK2MSFTNGP03.phx.gbl...
>Is there anyway to inline Page_Error type global error handling in an
ASP.Net webpage? Currently I work on a very large web system where the
entier web front end is contained in a single project file. I would like
to have inline Page_Error methods for certain pages, particularly some
XML exchanges I have in place for some AJAX functionality. Thx for any
info,

Carlo


Sep 6 '06 #4

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

Similar topics

2
by: Tee | last post by:
what's the differences between "Overrides Sub OnError" and "Sub Page_Error" ?
2
by: fump75 | last post by:
Hello, I would like to show an error message in a user control when an exception is thrown. This message should be built in Page_error or Application_error event and i don't manage to reach a...
4
by: Alex Nitulescu | last post by:
Hi. I read about Page_Error and Application_Error. However, I provoke an error in a page but still Page_Error won't run. This is all the code I have left in my page: ...
1
by: Buddy Ackerman | last post by:
I have a page where users upload files. I have the maxRequestLength set and have created a Page_Error procedure to trap the error when someone load a file that is larger than the maxRequestLength....
2
by: Carl Johansen | last post by:
I've been reading the O'Reilly "ASP.NET Cookbook" 1st edition (Kittel and LeBlond), and it makes a recommendation about exception handling that seems a bit strange. They say that, if you want to...
6
by: Matt | last post by:
Can anyone give me a good reason to use BOTH application scope Page_Error and the page scope Page_Error when trapping errors in a web application? Is there any real benefit to using the Page_Error...
2
by: Matt | last post by:
As the subject says... are Application_Error and Page_Error triggered by the same event? In other words, is there any error that could slip by Application_Error but be caught by Page_Error, or...
0
by: slolife | last post by:
What I am trying to do is handle the HttpRequestValidationException with code, but only on pages that are equipped to handle it with special customvalidators, controls, etc.. But what I cannot...
2
by: Erik Lautier | last post by:
I've got Page_Error emailing me the message and stack trace when a server error is generated, but it doesn't always work. My Page_Error code: Sub Page_Error(ByVal src As Object, ByVal args As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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
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...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.