我有一个问题,我正在我的网页中创建一个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>
<Animations>
<OnShown><Fadein Duration="0.50" /></OnShown>
<OnHiding><Fadeout Duration="0.75" /></OnHiding>
</Animations>
<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;
}