BT

InfoQ Homepage News VS 2008 to Support Nested Master Pages

VS 2008 to Support Nested Master Pages

Bookmarks

One of the most lauded features in ASP.NET 2.0 is Master Pages. Master Pages serve as templates for a site, making it easier to create and maintain consistent style site-wide. They do have one drawback under VS 2005: they cannot be nested.

Nested master pages are essential for larger sites that have more than one layout. Without them, developers have to manually ensure the common elements in each master page such as banners and copyright notices are kept in sync.

It turns out that nested master pages are actually supported by ASP.NET 2.0 itself. It is only in the Visual Studio 2005 IDE where they cannot be used. Visual Studio 2008 adds full support for nested master pages, allowing developers to switch to this model without losing IDE support.

It should be noted that since this feature is in ASP.NET 2.0, developers will not need to deploy .NET 3.5 to their production servers. They merely need to ensure that the project is set to compile to .NET 2.0.

Scott Guthrie has a walk-through of nested master pages on his blog. 


Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Visual visual studio?

    by Thom Nichols /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    When you say "can't be used in the Visual Studio 2005 IDE," you mean they don't work in the visual designer, right? So I can still develop nested master pages from VS2005... Right?

    No matter - the visual designer is pretty crappy anyhow, I never used it :)

  • Re: Visual visual studio?

    by Eugen Anghel /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I actually found nested master pages in VS2005 to be quite useful. They keep you (and your team) away from the designer :D

  • Re: Visual visual studio?

    by Jonathan Allen /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    You are correct, I misspoke in that regard.

  • Re: Visual visual studio?

    by John DeHope /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    "No matter - the visual designer is pretty crappy anyhow, I never used it :)"
    I agree if we're talking about VS 2003. But the VS 2005 designer is awesome, I must say. It's very robust, and the tag breadcrumbs are great. I just wish VS 2005 would target .Net 1.1 without fiddling so I could use it with my legacy 1.1 project.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.