1

这是我的嵌套中继器的 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)中的视图时,我需要触发 ItemCommand 参数。请给我解决此问题的建议。

4

1 回答 1

1

正如@Tim 建议的那样

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

repsubtopic_ItemCommand在你的代码后面定义。

于 2014-10-07T07:17:57.007 回答