多个 UpdatePanelAnimationExtender 控件 AjaxControlToolKit [英] Multiple UpdatePanelAnimationExtender Controls AjaxControlToolKit
问题描述
我在使用 UpdatePanelAnimationExtender 和多个更新面板时遇到问题.我想要发生的是面板淡出,更新,然后淡入.
I am having a problem with the UpdatePanelAnimationExtender and multiple update panels. What I want to happen is for the panel to fade out, update, and then fade back in.
然而,它淡出所有面板,只淡化我更新的面板.显然这是 UpdatePanelAnimationExtender 的一个相当普遍的问题,但我似乎找不到解决方案.有人碰巧知道解决这个问题的方法吗?提前致谢.
However, it fades out all the panels and only fades the one I updated back in. Apparently this is a rather common problem with UpdatePanelAnimationExtender, but I can't seem to find a solution. Would anyone happen to know of a way to work around this problem? Thanks in advance.
这是一些示例代码:
<asp:UpdatePanel ID="update1" runat="server" UpdateMode="Conditional">
//--My Code goes in here
</asp:UpdatePanel>
<cc1:UpdatePanelAnimationExtender ID="updateAnimation1" runat="server" TargetControlID="update1">
<Animations>
<OnUpdating>
<FadeOut Duration="0.2" Fps="20" />
</OnUpdating>
<OnUpdated>
<FadeIn Duration="0.2" Fps="20" />
</OnUpdated>
</Animations>
</cc1:UpdatePanelAnimationExtender>
<asp:UpdatePanel ID="update2" runat="server" UpdateMode="Conditional">
//--My Code goes in here
</asp:UpdatePanel>
<cc1:UpdatePanelAnimationExtender ID="updateAnimation2" runat="server" TargetControlID="update2">
<Animations>
<OnUpdating>
<FadeOut Duration="0.2" Fps="20" />
</OnUpdating>
<OnUpdated>
<FadeIn Duration="0.2" Fps="20" />
</OnUpdated>
</Animations>
</cc1:UpdatePanelAnimationExtender>
推荐答案
在 UpdatePanels 上设置 UpdateMode=Always 并修复它
Set the UpdateMode=Always on the UpdatePanels and that will fix it
这篇关于多个 UpdatePanelAnimationExtender 控件 AjaxControlToolKit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!