views:

8

answers:

0

if i have a Repeater bound to a SPDataSource and within the repeaters template another Repeater and SPDataSource. How do I pass a parameter from the outer SPDataSource to the inner?

<div class="menu-container">

<sharepoint:spdatasource id="SPDataSourceCategories" runat="server" datasourcemode="List" 
            useinternalname="true" selectcommand='<Query><Where><Eq><FieldRef Name="ShowOnMenu" /><Value Type="Boolean">1</Value></Eq></Where><OrderBy><FieldRef Name="Category_x002d_Order" Ascending="True" /></OrderBy></Query>'>
            <SelectParameters>
                <asp:Parameter Name="WebUrl" DefaultValue="..." />
                <asp:Parameter Name="ListName" DefaultValue="Categories" />
            </SelectParameters>
        </sharepoint:spdatasource>


        <asp:Repeater ID="MenuRepeater" runat="server" DataSourceID="SPDataSourceCategories" >
            <HeaderTemplate>
                <ol>
            </HeaderTemplate>
            <ItemTemplate>
                <li id="abc"><%# Eval("Title") %>

                <sharepoint:spdatasource  id="SPDataSourceSubCategories"  runat="server" datasourcemode="List" useinternalname="true"           
                selectcommand='<Query><Where><Eq><FieldRef Name="Sub_x002d_Category" /><Value Type="Lookup">{Cat}</Value></Eq></Where><OrderBy><FieldRef Name="Sub_x002d_Category_x002d_Order" Ascending="True" /></OrderBy></Query>'>

                        <SelectParameters>
                            <asp:Parameter Name="WebUrl" DefaultValue="..." />
                            <asp:Parameter Name="ListName" DefaultValue="Sub-Categories" />
                    <asp:Parameter Name="Cat" DefaultValue="<%# Eval("Title") %>" />
                        </SelectParameters>

                </sharepoint:spdatasource>


                <asp:Repeater runat="server" DataSourceID="SPDataSourceSubCategories" >

                <ItemTemplate>
                    <%# Eval("SubCategoryName") %>
                </ItemTemplate>

                </asp:Repeater>



                </li>
            </ItemTemplate>
            <FooterTemplate>
                </ol></FooterTemplate>
            <SeparatorTemplate>
            </SeparatorTemplate>
        </asp:Repeater>