简体   繁体   English

如何在ASP.NET C#的中继器控件内使用子中继器控件

[英]How to use Child Repeater Control inside a Repeater Control in asp.net c#

i am using a repeater control in asp.net and i want to use one more repeater control inside the existing repeater control. 我在asp.net中使用了一个转发器控件,我想在现有转发器控件中再使用一个转发器控件。

Example: 例:

  <!-- start child repeater -->


  <!-- end child repeater -->

use the following 使用以下

    <asp:Repeater ID="rp_resList" runat="server" >
        <ItemTemplate>
            <asp:HiddenField ID="hf_resID" runat="server" Value='<%#  Eval("Id") %>' />
            <asp:LinkButton ID="lnkResName" runat="server">Resource Name</asp:LinkButton>
            <br />
            <asp:Literal ID="litSummary" runat="server" Text='<%#  Eval("summary") %>'></asp:Literal>
            <br />
            <asp:Repeater ID="rp_tagsSkill" runat="server">
                <ItemTemplate>
                    <h6>
                        <%#  Eval("Description") %></h6>
                </ItemTemplate>
            </asp:Repeater>
            <div id="controls">
                <asp:ImageButton ID="imgBtnBookmark" runat="server" />
                <asp:Button ID="btnLike" runat="server" Text="Button" />
                <asp:Literal ID="litComments" runat="server" Text="Comment (7)"></asp:Literal>
                <asp:Button ID="btnShare" runat="server" Text="Button" />
            </div>
        </ItemTemplate>
    </asp:Repeat>

in the you define your other repeter and for more detail follow the following link nested Repeter 在中,您可以定义其他中继器,有关更多详细信息,请遵循以下嵌套嵌套的中继器

在您的itemdatabound中找到您的孩子中继器并将其绑定。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用c#asp.net循环中继器控件内部的div部分? - how to loop div section which is inside repeater control using c# asp.net? Asp.Net / C#-如何获取在重复器内嵌套的Label控件的文本? - Asp.Net / C# - How to get the Text of a Label control nested inside a Repeater? 如何在按钮单击事件中的中继器中找到控件,并将中继器放置在ASP.NET C#的gridview中 - How to find control with in repeater on button click event and repeater is placed with in gridview in asp.net C# 将事件添加到asp.net C#中的中继器控件内部的复选框 - Adding event to checkbox which is present inside repeater control in asp.net c# 如何在 ASP.NET 中使用带有中继器控件的分页? - How to use paging with Repeater control in ASP.NET? 在嵌套转发器控件中显示数据以及如何使用asp.net将值ParentID从父转发器传递到子转发器 - Display data in Nested repeater control & how to pass value parentID from Parent Repeater to Child Repeater using asp.net 如何动态更改中继器内的控件ID(C#asp.net)? - How to change the id of control within the repeater dynamically (C# asp.net)? 如何将数据绑定到ASP.NET C#中的转发器控件? - How can bind data to repeater control in asp.net c#? ASP.NET转发器控件-在转发器控件内获取Hiddenfield值 - ASP.NET Repeater Control - Getting Hiddenfield value inside the repeater control 在转发器asp.net中的用户控件上查找下拉值 - Find dropdown values on user control inside repeater asp.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM