我遇到的问题是我在网页中创建了一个ModelPopUpExtender控件。它在没有动画标签的情况下正常运行,但当我在其中添加动画标签时,它会返回错误“动画在TargetControlID =”Button2“使用属性AjaxControlToolkit.ModalPopupExtender.OnShowing不存在或无法设置“
我不知道为什么它会返回这种类型的错误?请建议我任何解决方案。
提前致谢。
代码:
<asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="Button2" CancelControlID="Button4" PopupDragHandleControlID="Panel2" DropShadow="true">
<Animations>
<OnShowing>
<FadeIn Duration=".5" Fps="30" />
</OnShowing>
<OnShown>
<FadeIn Duration=".5" Fps="30" />
</OnShown>
<%-- neither animation works from code-behind --%>
<OnHiding>
<FadeOut Duration=".5" Fps="30" />
</OnHiding>
<OnHidden>
<FadeOut Duration=".5" Fps="30" />
</OnHidden>
</Animations>
</asp:ModalPopupExtender>
答案 0 :(得分:0)
<Animations>
<OnShown><Fadein Duration="0.50" /></OnShown>
<OnHiding><Fadeout Duration="0.75" /></OnHiding>
</Animations>
答案 1 :(得分:0)
<asp:ModalPopupExtender runat="server" ID="ModalPopupExtender2" TargetControlID="Button2"
PopupControlID="Panel2"
DropShadow="true"
BackgroundCssClass="modalBackground"
CancelControlID="Button4">
<Animations>
<OnShown><Fadein Duration="0.50" /></OnShown>
<OnHiding><Fadeout Duration=".05" /></OnHiding>
</Animations>
</asp:ModalPopupExtender>
<asp:Panel runat="server" ID="PnlDesignation" ScrollBars="Auto" CssClass="loginpnl" style="display:none">
<div class="closepop text-right" id="Button4" > </div>
</asp:Panel>
CSS
.modalBackground
{
background-color: #000;
filter: alpha(opacity=70);
opacity: 0.70;
}
.closepop
{
margin:0 0 0 20px;
BACKGROUND: url(../images/close.png) no-repeat 0 0;
WIDTH:26px;POSITION: relative; background-position:right;
HEIGHT: 26px;
cursor:pointer;
z-index: 100000;
float:right;
}