Subclassing Page

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
 
K

Ken Cox [Microsoft MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top