Home All Groups Group Topic Archive Search About

Repeating content in master pages

Author
27 Nov 2008 4:50 PM
Vrlvrox
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.

Author
27 Nov 2008 5:29 PM
Nathan Sokalski
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
njsokal***@hotmail.com
http://www.nathansokalski.com/

Show quoteHide quote
"Vrlvrox" <NOM***@NOWHERE.NO> wrote in message
news:e5TOFCLUJHA.6060@TK2MSFTNGP06.phx.gbl...
> 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.

Bookmark and Share