Hi Sam,
Generally we can use the HttpContext.Current.Handler to retrieve current
request's processing handler, for example:
System.Web.UI.Page page = (System.Web.UI.Page)HttpContext.Current.Handler ;
but, don't think it'll be helpful in the Application_Error event since at
that time the current processing is throwed to application level and won't
return to page level. I agree with Konrad that we can use the Page_Error
even
if we want to do some page level operations when the unhandled error
occur.
Here is a tech article discussing on the error handling in ASP.NET
#Rich Custom Error Handling with ASP.NET
http://msdn.microsoft.com/library/en-us/dnaspp/html/customerrors.asp?frame=t
rue
Hope also helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx