This question is somewhat vague, and I imagine there's no single "best" answer. But I welcome the experiences of others, and how they've approached similar issues.
The basic idea is, I like the idea of using Master Pages for my website, for things like the main logo and navigation. But with all but the simplest navigation, there will be individual customization on any given page. As a terribly simple example of what I mean, go to http://www.cnn.com. Navigate their various "tabs" along the top (Home, World, U.S., Politics, etc). When you click the tab, it brings you to that page, but the menu is altered slightly such that the current tab is highlighted. I'm not interested in the specific implementation of their website, it's just the concept I'm referring to.
So, the real question being put forth in this post is, what's the best way to approach the idea of Master Page content that has individual customization on a given page? From my limited investigation, I've got the following ideas. I don't know if one is better than the rest, or if there's a whole different method that's much better, but here they are:
1) Nested Master Pages
Let's say my website has a navigation menu with "Home", "Contact", "Pictures" and "Misc" as menu links. When you're on one of these pages, that menu option should be highlighted. And for each of these topics, I want a different image displayed towards the top of the page. So, that's pretty simple. The approach here would be to create a Master Page that contains ContentPlaceholders for the areas that might change. So, in the Master Page, there would be a full layout, with several ContentPlaceholders, with default contents for each of the menu buttons, as well as the image area. In general, just using this Master Page would produce a good looking page, with no customization. But now I make another Master Page that uses the first Master Page, and I override the contents of the ContentPlaceholders. So, on the "Home" Master Page, I'd override the contents of "ContentPlaceHolder_Home", for example, with a button that uses a different CSS class, so that the menu button will be highlighted.
That's just a simple idea. The bad thing about it is that VS 2005 doesn't offer Design mode when using Nested Master Pages. I've seen the hack to get around it, and wondered if it was the best way to go, or if that was sloppy.
2) Accessing Master Page data in the Content page
In this case, I'd have a Control in the Master Page, which handles all the settings for the menu and the page image. The Content page would use the Master page, and would programatically, on Page_Load, modify certain values. This idea seems simple enough, but it feels a little sloppy, since every page using the Master Page would need the extra code to handling custom preferences.
3) Accessing Content Page data in the Master Page
This is kind of the reverse of the 2nd example. In this case, I'd create a custom control, which is used in the Content page. It might be something like this:
<MyPrefix:MyControl ID="ctrl1" runat="server"
highlight="Home"
menuImage="banner_2.png"
/>
Then, the Master Page would check for a MyControl object when it's loaded, and override its contents if it finds one. This means that setting up a new page is fairly simple, registering and calling just a single control, which informs the Master Page on what to do. I'm leaning towards this one, just for the simplicity of it.
Anyway, those are my ideas. Is there a very different way of going about things in this manner? I'm interested in what others have done with this sort of thing.
-Dan