简体   繁体   中英

How to fire ItemCommand argument child repeater in nested repeater control in c#.net

Here is my aspx page code for nested repeater..

<asp:Repeater ID="repAccordian" runat="server" OnItemDataBound="repAccordian_ItemDataBound" onitemcommand="repAccordian_ItemCommand">
    <ItemTemplate>
    <%#Eval("TopicName")%>
    <asp:Label ID="lbltopicid" runat="server" Visible="false" Text='<%#Eval("TopicID")%>' </asp:Label>
    <div>
    <asp:Repeater ID="repsubtopic" runat="server"><ItemTemplate>
    <%#Eval("SubTopicName")%>                              
    <a href='' class='click'>
    <asp:Label ID="lblView" CommandName="View" CommandArgument='<%# Eval("SubTopicID") %>'
     runat="server" Text="View" /></a>
    </ItemTemplate>
    </asp:Repeater>
    </div>
    </ItemTemplate>
    </asp:Repeater>

i need to fire ItemCommand argument when click on view in child repeater(repsubtopic).. pls give me suggestions to solve this problem.

As @Tim suggested

<asp:Repeater ID="repsubtopic" runat="server" 
      onitemcommand="repsubtopic_ItemCommand">

and define repsubtopic_ItemCommand in your code behind.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM