How to include a menu?

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?
 
M

Mikeon

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.
 
S

Steve C. Orr [MVP, MCSD]

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.
 

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