Add User Controls in base class

  • Thread starter Thread starter Andrea Williams
  • Start date Start date
A

Andrea Williams

I have a Base class from which every page inherits. I would like to keep my
navigation Menu on every page and would like to add it to the site globally
from my base class instead of adding it to each page. Does anyone know of a
tutorial on how this could be done?

Thanks in advance!
Andrea
 
That could not be done with ASP.Net 1.1. I believe it could be done with
ASP.Net 2.0, but I haven't any experience with that yet. On the other hand,
you could use a custom Server Control in a base Page class, as it doesn't
require a Template file.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
You can make a class that derives from System.Web.UI.Page then create new
pages that derive from this class
public class TPage : System.Web.UI.Page
then any new page derive from TPage.
You can then write any code functions and so forth will be inherited and
affect all those derived classes a base class. I have not been able to do it
with the form only with the class.

Enrique.
 
Back
Top