简体   繁体   English

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

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

Here is my aspx page code for nested repeater.. 这是我的嵌套中继器的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>

i need to fire ItemCommand argument when click on view in child repeater(repsubtopic).. pls give me suggestions to solve this problem. 我需要在子中继器(repsubtopic)中单击视图时触发ItemCommand参数。请给我一些解决此问题的建议。

As @Tim suggested 正如@Tim建议的

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

and define repsubtopic_ItemCommand in your code behind. 并在后面的代码中定义repsubtopic_ItemCommand

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

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