Visual Studio 2008 - Thursday August 9, 2008 - More Wally - Wallace B. McClure
in

MoreWally.com

Giving people what they want, More Wally. This is the technical and personal blog site of
Wallace B. (Wally) McClure.

This Blog

Syndication

Technical Sites

More Wally - Wallace B. McClure

This blog will have all kinds of posts about Wally McClure. In it, there will be tons of .NET and computer programming posts as well as Wally's views on life in general. As you might guess, this site and blog help you get More Wally in your life. What more could anyone want? .NET, ADO.NET, ASP.NET, AJAX, Atlas, Microsoft AJAX Library, ASP.NET 2.0 AJAX Extensions, ............

Visual Studio 2008 - Thursday August 9, 2008

Nested Master Pages

As I was working up my talk on Visual Studio 2008 and started working on my Nested Master Pages.  Oh my gosh, it actually works. 

I created this parent master page

 Parent Master Page

I then created this child master page

Child Master page 

And then the result was this page

Resulting Viewable page

You might not be able to see it, but I can edit the child page just like I thought I could.  While I don't use Master Pages in any major way, I definitely think this is a really cool WOW feature.

To put this into a simple display of information, here are the simple versions of the various files.

MasterPage Parent file:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPageParentSimple.master.cs" Inherits="MasterPageParentSimple" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        Simple Parent Master Page.<br />
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
       
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>

MasterPage Child file:

 <%@ Master Language="C#" MasterPageFile="~/MasterPageParentSimple.master" AutoEventWireup="false" CodeFile="MasterPageChildSimple.master.cs" Inherits="MasterPageChildSimple" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    Simple Child Master Page<br />
    <asp:ContentPlaceHolder ID="Content3" runat="server">
        
    </asp:ContentPlaceHolder>
</asp:Content>

ASPX file:

<%@ Page Language="C#" MasterPageFile="~/MasterPageChildSimple.master" AutoEventWireup="true" CodeFile="DefaultSimpleMasterPageExample.aspx.cs" Inherits="DefaultSimpleMasterPageExample" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content3" Runat="Server">
    this is some basic content.
</asp:Content>

IDE View:

IDE Output 

Resulting output:

Output of the nested master pages.

 

Javascript Intellisense

While it doesn't seem to solve every problem, calling "devenv /resetsettings" does seem to resolve some of the issues that I am having with Javascript Intellisense.  It might be worth giving it a try to see if it resolves your problems.

Comments

 

ASP.NET Podcast said:

Subscribe &lt;-- What everyone wants. Download as WMV Download as M4V for iPod and Zune Download as MP3

August 22, 2007 4:42 PM
 

Community Blogs said:

Subscribe &lt;-- What everyone wants. Original url: aspnetpodcast.com/.../asp.net_podcast

August 22, 2007 10:52 PM
 

links for 2007-09-09 | xanders blog said:

Pingback from  links for 2007-09-09 | xanders blog

September 9, 2007 1:25 AM
 

http://morewally.com/cs/blogs/wallym/archive/2007/08/09/visual-studio-2008-thursday-august-9-2008.aspx said:

March 16, 2008 4:32 PM

About wallym

Wallace B. (Wally) McClure INETA Speaker's Bureau Microsoft MVP ASPInsider Co-author of "Beginning AJAX with ASP.NET" Co-author of "Professional ADO.NET Programming" Co-author of "Building Highly Scalable Database Applications with .NET" Master's Degree in Electrical Engineering from Georgia Tech Bachelor's Degree in Electrical Engineering from Georgia Tech
2006 - Wallace B. McClure
Powered by Community Server (Non-Commercial Edition), by Telligent Systems