For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > July 2006 > Simple example of error handling using base class inheritance?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Simple example of error handling using base class inheritance?
Doug

2006-07-03, 7:04 pm

Can someone point me to a very simple example in VB.NET/ASP.NET of
inheritance from a base class? I would like to define a BasePage class
from which all of my pages can inherit.

I would like to use this as an error handler.

Thanks for any help you can provide.

Doug

2006-07-03, 7:04 pm

I found this:

http://www.aspnetpro.com/Newsletter...p200305mc_l.asp

and put it into my solution. Changed the first line in my
MainMenu.aspx.vb from "Inherits System.Web.UI.Page" to "Inherits
PageBase". Put a break on the first line of code and forced an error,
but it didn't go there. I currently have "CustomErrors mode="On" in
web config and defaultRedirect pointing to "ErrorHandler.aspx". Not
sure if I am mixing two dif't things together here or not.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com