Repeating content in master pages

Discussion in 'ASP .Net Web Controls' started by Vrlvrox, Nov 27, 2008.

  1. Vrlvrox

    Vrlvrox Guest

    Hello

    I'm just starting with master pages and content placeholders and I can't
    seem to find a way to have 'repeating content'.
    Is something like this even posible?
    Here's an example of what I mean (in pseudo tags):

    master:
    <table>
    <tr><th>col1</th><th>col2</th></tr>
    <asp:repeating content placeholder id="rcp">
    <tr><td><asp:ContentPlaceHolder id="col1"
    /></td><td><asp:ContentPlaceHolder id="col2" /></td></tr>
    </asp:repeating content placeholder>
    </table>

    page with content substitution:
    <asp:repeating content placeholder="rcp">
    <asp:Content ContentPlaceHolderID="col1">Row 1 Col1</asp:Content>
    <asp:Content ContentPlaceHolderID="col2">Row 1 Col2</asp:Content>
    </asp:repeating content>
    <asp:repeating content placeholder="rcp">
    <asp:Content ContentPlaceHolderID="col1">Row 2 Col1</asp:Content>
    <asp:Content ContentPlaceHolderID="col2">Row 2 Col2</asp:Content>
    </asp:repeating content>

    final result:
    col1 | col2
    --------------------------
    Row1 Col1 | Row1 Col2
    --------------------------
    Row2 Col1 | Row2 Col2

    v.
     
    Vrlvrox, Nov 27, 2008
    #1
    1. Advertising

  2. I don't believe it is, the best way to achieve that would probably be to use
    a repeater in the content page.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "Vrlvrox" <> wrote in message
    news:...
    > Hello
    >
    > I'm just starting with master pages and content placeholders and I can't
    > seem to find a way to have 'repeating content'.
    > Is something like this even posible?
    > Here's an example of what I mean (in pseudo tags):
    >
    > master:
    > <table>
    > <tr><th>col1</th><th>col2</th></tr>
    > <asp:repeating content placeholder id="rcp">
    > <tr><td><asp:ContentPlaceHolder id="col1"
    > /></td><td><asp:ContentPlaceHolder id="col2" /></td></tr>
    > </asp:repeating content placeholder>
    > </table>
    >
    > page with content substitution:
    > <asp:repeating content placeholder="rcp">
    > <asp:Content ContentPlaceHolderID="col1">Row 1 Col1</asp:Content>
    > <asp:Content ContentPlaceHolderID="col2">Row 1 Col2</asp:Content>
    > </asp:repeating content>
    > <asp:repeating content placeholder="rcp">
    > <asp:Content ContentPlaceHolderID="col1">Row 2 Col1</asp:Content>
    > <asp:Content ContentPlaceHolderID="col2">Row 2 Col2</asp:Content>
    > </asp:repeating content>
    >
    > final result:
    > col1 | col2
    > --------------------------
    > Row1 Col1 | Row1 Col2
    > --------------------------
    > Row2 Col1 | Row2 Col2
    >
    > v.
     
    Nathan Sokalski, Nov 27, 2008
    #2
    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. Replies:
    1
    Views:
    3,291
    PeterKellner
    May 16, 2006
  2. Replies:
    0
    Views:
    760
  3. vikramp
    Replies:
    3
    Views:
    773
    vikramp
    Oct 13, 2006
  4. jobs
    Replies:
    1
    Views:
    486
    clintonG
    Dec 13, 2006
  5. sjsean

    master pages and content pages

    sjsean, Aug 1, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    475
    Scott M.
    Aug 1, 2009
Loading...

Share This Page