Subclassing Page

  • Thread starter Thread starter paul.hester
  • Start date Start date
P

paul.hester

Hi all,

I'm planning to migrate a website from ASP to ASP .NET 2.0. The old
page has a common include file that performs a series of tasks when
every page loads. I'm new to ASP .NET 2.0 and am not sure of the best
way to implement this. I'm considering subclassing the Page class so
that all these tasks will automatically run without every page needing
to initiate it.

Are there any pitfalls I should be aware of with subclassing the Page
class? Is there another method that you would recommend?

Thanks,

Paul
 
Hi Paul,

If there are tasks for each page, you could also put that common code in a
master page to keep things simple.

Ken
 
Back
Top