如何在c#.net中的嵌套中继器控件中激发ItemCommand参数子中继器

如何在c#.net中的嵌套中继器控件中激发ItemCommand参数子中继器,c#,asp.net,repeater,asprepeater,nested-repeater,C#,Asp.net,Repeater,Asprepeater,Nested Repeater,这是我的嵌套中继器的aspx页面代码 <asp:Repeater ID="repAccordian" runat="server" OnItemDataBound="repAccordian_ItemDataBound" onitemcommand="repAccordian_ItemCommand"> <ItemTemplate> <%#Eval("TopicName")%> <asp:Label ID="lbltopicid"

这是我的嵌套中继器的aspx页面代码

<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>

在子转发器(repsubtopic)中单击view时,我需要激发ItemCommand参数。。 请给我一些建议来解决这个问题。

正如@Tim所建议的那样

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


然后定义一个
onitemcommand=“repsubtopic\u itemcond”
。受保护的无效repsubtopic\u itemcond(对象源,RepeaterCommandEventArgs e){try{int subid=Convert.ToInt32(e.CommandArgument);}catch(异常ex){}