UpdatePanel中的嵌套中继器

时间:2018-09-14 16:53:48

标签: c# asp.net updatepanel repeater nested-repeater

我有一个中继器,其中有2个嵌套的中继器。但是在页面加载和计时器刻度上,仅加载第一个转发器数据,而两个嵌套的转发器不加载任何数据。我究竟做错了什么?我取出了updatepanel,它在下面的代码中工作正常:

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Repeater ID="rptTitle" runat="server" SelectMethod="rptTitle_GetData" ItemType="WayfindingDashboard.Library.Models.WayfindingInfo">
            <ItemTemplate>

                <div class="title lightblue">
                    <%#Item.GroupName%>
                </div>
                <div class="purple Name">
                    <div class="col-md-3 col-sm-3 col-xs-3 col-lg-3 text-center" style="margin: 0; padding: 0; height: 100%">
                        <img class="icon-elevator" />
                    </div>
                    <div class="col-md-9 col-sm-9 col-xs-9 col-lg-9 WayfindingTitle">
                        <%#Item.Name%>
                    </div>

                </div>

                <asp:Repeater ID="rptMain" runat="server" DataSource="<%#Item.ListOfLocations%>" ItemType="WayfindingDashboard.Library.Models.WayfindingInfo">
                    <ItemTemplate>
                        <div class="purple">
                            <div class="col-md-9 col-sm-9 col-xs-9 col-lg-9">
                                <div class="location">
                                    <%#Item.LocationName%>
                                </div>
                                <asp:Repeater ID="rptServices" runat="server" DataSource="<%#Item.ListOfServices%>" ItemType="WayfindingDashboard.Library.Models.WayfindingInfo">
                                    <ItemTemplate>
                                        <div class="service">
                                            <asp:Label ID="lblService" runat="server" Text="<%#Item.Service%>"></asp:Label>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </div>
                            <div class="col-md-3 col-sm-3 col-xs-3 col-lg-3 text-center">
                                <span class="<%#Item.IconDirectionCSS%>"></span>
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            </ItemTemplate>
        </asp:Repeater>

    </ContentTemplate>
</asp:UpdatePanel>

0 个答案:

没有答案
相关问题