Missing Content Placeholder in nested master content page

Discussion in 'ASP .Net' started by John, Jan 14, 2008.

  1. John

    John Guest

    Hi,

    I'm having trouble with nested master pages (and creating the same behaviour
    as Scott Guthrie's blog post
    http://weblogs.asp.net/scottgu/archive/2007/07/09/vs-2008-nested-master-page-support.aspx )
    ..

    I have a 'Main' master and added a 'Sub' master (based on 'Main') and
    finally added a 'Home' content page (based on 'Sub'). However rather than
    the expected Content Placeholder control the content page has a comment
    saying: "<%-- Add content controls here --%>", but the control isn't
    available in the toolbox. This does seem to happen in Scott's demo, can
    anyone help?

    (Using VS 2008 Pro RTM)

    Thanks in advance.

    John
     
    John, Jan 14, 2008
    #1
    1. Advertising

  2. Hi John,

    I'm not sure if I fully understand the question here. I just tried the
    nested master page on VS2008, both in Website mode and Web Application
    Project mode, which all work correctly. The only difference is that in Web
    Application Project mode, when we add a new WebForm, we don't have the
    option to "Choose MasterPage", instead, we can open the master page and
    select menu "Website/Add Content Page" to create a new content page for
    current master page.

    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jan 15, 2008
    #2
    1. Advertising

  3. John

    John Guest

    Hello Walter,

    Thanks for you reply. Following your reassurance I've been back to the
    problem and realised my mistake. The problem was that I hadn't added a new
    Content Placeholder to the 'Sub' master and so even though I based the
    content page on the 'Sub' master there was no placeholder for it to look at.

    Hope that helps others who make the same mistake.

    Thanks again Walter.

    Best regards

    John

    ""Walter Wang [MSFT]"" <> wrote in message
    news:...
    > Hi John,
    >
    > I'm not sure if I fully understand the question here. I just tried the
    > nested master page on VS2008, both in Website mode and Web Application
    > Project mode, which all work correctly. The only difference is that in Web
    > Application Project mode, when we add a new WebForm, we don't have the
    > option to "Choose MasterPage", instead, we can open the master page and
    > select menu "Website/Add Content Page" to create a new content page for
    > current master page.
    >
    > Regards,
    > Walter Wang (, remove 'online.')
    > Microsoft Online Community Support
    >
    >
    >"John" <> wrote in message
    >news:eFjV%...
    > Hi,
    >
    > I'm having trouble with nested master pages (and creating the same
    > behaviour as Scott Guthrie's blog post
    > http://weblogs.asp.net/scottgu/archive/2007/07/09/vs-2008-nested-master-page-support.aspx )
    > .
    >
    > I have a 'Main' master and added a 'Sub' master (based on 'Main') and
    > finally added a 'Home' content page (based on 'Sub'). However rather than
    > the expected Content Placeholder control the content page has a comment
    > saying: "<%-- Add content controls here --%>", but the control isn't
    > available in the toolbox. This does seem to happen in Scott's demo, can
    > anyone help?
    >
    > (Using VS 2008 Pro RTM)
    >
    > Thanks in advance.
    >
    > John
    >
     
    John, Jan 15, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug McCann
    Replies:
    1
    Views:
    1,079
    William Brogden
    Aug 5, 2004
  2. Zeba
    Replies:
    1
    Views:
    524
    Mark Rae
    Feb 22, 2007
  3. katmagic
    Replies:
    0
    Views:
    1,280
    katmagic
    Dec 26, 2008
  4. Nathan Sokalski
    Replies:
    25
    Views:
    1,469
    Nathan Sokalski
    Mar 4, 2010
  5. nail

    Build control in a placeholder or like a placeholder

    nail, Sep 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    352
Loading...

Share This Page