|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Repeating content in master pagesI'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. I don't believe it is, the best way to achieve that would probably be to use
a repeater in the content page. 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.
Other interesting topics
asp:dropdown list width
asp button always rendered as type="button" vs. type="submit" Upload multiple files Multiple controls with the same ID set <head> from ascx WebBrowser control not responding because of Javascript DynamicItemTemplate not applied on programmatically added Menu Items Re: How to Reference Gridview child controls Reportviewer not showing any data visual clue for PopulateOnDemand |
|||||||||||||||||||||||