【问题标题】:How to set the update panel trigger for the control inside repeater control?如何为中继器控件内的控件设置更新面板触发器?
【发布时间】:2011-12-05 06:43:58
【问题描述】:

我在我的网页中使用了 ajax 更新面板。我想在更新面板上设置触发器。我在 asp.net 中继器控件中放置了 asp.net 链接按钮控件。当我单击中继器控件中的链接按钮时,更新面板上的内容应该会更新。我使用了链接按钮的 onclick 事件。那么这种情况下如何设置触发器呢?

谢谢

【问题讨论】:

    标签: triggers updatepanel repeater itemtemplate linkbutton


    【解决方案1】:

    我通过以下方式解决了这个问题-

    protected void rptPagerCustomerUp_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        LinkButton lb = e.Item.FindControl("lnkPage") as LinkButton;
        ScriptManager.GetCurrent(this).RegisterAsyncPostBackControl(lb);  
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-21
      • 2013-05-26
      • 1970-01-01
      • 2011-02-03
      • 1970-01-01
      • 2012-01-03
      • 2011-01-28
      • 2011-08-11
      相关资源
      最近更新 更多