How to obtain a reference to derived class from base?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to centralize some initialization routines in my web application
by placing logic into a 'base form' that all web pages inherit from.

In the class for the base form, I would like to be able to reference in some
event (Pre_load, perhaps), the inheriting class without having to explicitly
pass this up as a property set. Is there an easy way to do this?

More specifically, I'm using log4net and I want to have separate loggers for
each page where the %logger property shows as 'webForm1.aspx' instead of
'basePage.aspx' for each log entry.
 
More specifically, I'm using log4net and I want to have separate loggers for
each page where the %logger property shows as 'webForm1.aspx' instead of
'basePage.aspx' for each log entry.

this.GetType() will return type info for the actual type of the
current page object.

Request.FilePath returns the file path of the page being requested if
that's what you're looking for.


Mattias
 
Back
Top