这是嵌套转发器的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参数。 请给我一些解决这个问题的建议。
答案 0 :(得分:1)
正如@Tim所建议的那样
<asp:Repeater ID="repsubtopic" runat="server"
onitemcommand="repsubtopic_ItemCommand">
并在您的代码中定义repsubtopic_ItemCommand
。