Multiple Content Place Holders on Single Master Page

As it turns out, it is possible to have multiple content areas on a single master page.

Master Page:

  <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="Server"></asp:ContentPlaceHolder>
  <asp:ContentPlaceHolder 
id="ContentPlaceHolder2" runat="Server"></asp:ContentPlaceHolder>

Content Page:

 <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"></asp:Content>
 <asp:Content 
ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"></asp:Content>

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Print | posted on Tuesday, January 31, 2006 8:15 AM

Feedback

# re: Multiple Content Place Holders on Single Master Page

left by sasa at 1/6/2009 11:47 PM Gravatar
not related to my doubt..

# multiple placeholders

left by raf at 1/17/2009 10:12 PM Gravatar
please answer

# re: Multiple Content Place Holders on Single Master Page

left by Screek at 4/15/2009 6:26 PM Gravatar
Ty for showing it in a really simple way, helped me.

# re: Multiple Content Place Holders on Single Master Page

left by yogesh jadon at 4/15/2010 12:25 AM Gravatar
how to use this code

# re: Multiple Content Place Holders on Single Master Page

left by TT at 5/9/2010 3:31 PM Gravatar
What if we wanted a different .aspx page (content page) for each of the <contentplaceholder's> in the master page?

1 master page, with 3 contentplaceholders.
Which again has 3 different contentpages?! Not possible?

# re: Multiple Content Place Holders on Single Master Page

left by Fael at 8/4/2011 11:00 AM Gravatar
But...can I have 2 content pages ?
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: