1

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.

Surendra
  • 35
  • 1
  • 1
  • 9

1 Answers1

1

As @Tim suggested

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

and define repsubtopic_ItemCommand in your code behind.

शेखर
  • 17,412
  • 13
  • 61
  • 117
  • protected void repsubtopic_ItemCommand(object source, RepeaterCommandEventArgs e) { try { int subid = Convert.ToInt32(e.CommandArgument); } catch (Exception ex) { } } – Surendra Oct 07 '14 at 08:16