Repeater的onitemcommand怎么触发不了呢?
<asp:RepeaterID="rptGoods"runat="server"DataSourceID="LinqDataList"onitemcommand="rpt...
<asp:Repeater ID="rptGoods" runat="server" DataSourceID="LinqDataList" onitemcommand="rptGoods_ItemCommand">
<HeaderTemplate><asp:LinkButton ID="showDetail" runat="server" CommandName="showDetail" CommandArgument='<%# Eval("编号")%>'>明细</asp:LinkButton>
</ItemTemplate></asp:Repeater>
protected void rptGoods_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "showDetail")
{
// 处理这个事件
}
}
哪不对呀?! 展开
<HeaderTemplate><asp:LinkButton ID="showDetail" runat="server" CommandName="showDetail" CommandArgument='<%# Eval("编号")%>'>明细</asp:LinkButton>
</ItemTemplate></asp:Repeater>
protected void rptGoods_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "showDetail")
{
// 处理这个事件
}
}
哪不对呀?! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询