How to include a menu?

  • Thread starter Thread starter Tumurbaatar S.
  • Start date Start date
T

Tumurbaatar S.

All pages of my site contain a menu bar. This menu bar is some web control
(Aspxlab's BaseMenu). When adding a new page I simply copy this bar from
old page and paste it on the new one. So all my pages contain same control.
The problem is that when I need to make changes to the menu, I have to edit
all my pages.
Is there a way to exclude this menu from my pages, put it in a separate file
and
reference it from pages thru some link/method? I thought about server side
includes,
but the menu is not a plain HTML but a web control. So I don't imagine where
to put
a code associated with this menu control and how to access the menu from
page's codes.
Any ideas?
 
Hello!

Looks like the job for User Control -> .ascx
Add new user control to the project, put the menu on it and use this
new user control, everywhere You need to see the menu.
 
In a couple weeks you can upgrade to ASP.NET 2.0, then you'll be able to
configure all your new menu controls to use a single Site Map as a data
source.
 
Back
Top