我有一个自定义服务器控件,似乎工作正常,直到我把它放入UpdatePanel。一旦进入UpdatePanel,它将继续正常工作,但是当我的自定义服务器控件执行回发时,UpdatePanel现在会执行完整回发。自定义服务器控件导致UpdatePanel内完整回发
我是否需要做任何事情来让自定义服务器控件在UpdatePanel中执行异步回发?
以下是导致完整回发的相关代码。 ecs:Pager控件是我的自定义控件,即使它位于UpdatePanel中,也会导致OnCommand事件的完整回发。
<asp:UpdatePanel ID="ClosedIssuesUpdatePanel" runat="server">
<ContentTemplate>
<ecs:Pager ID="ClosedIssuesPager" OnCommand="ClosedIssuesPager_Command" runat="server" />
<asp:Repeater ID="ClosedIssuesRepeater" runat="server">
....
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
我也会对这个问题的答案感兴趣。我有一个自定义控件实现IPostBackDataHandler,它不会在UpdatePanel中进行部分回发。当你使用UseChildrenAsTriggers属性时,必须有一些秘密特性让控件被注册为触发器。 – 2009-07-27 22:12:49
如果在updatepanel上添加一个显式触发器以对customcontrol的事件执行异步回发,会发生什么情况? – AndreasKnudsen 2009-07-31 18:15:02