0

我有一个问题,我正在我的网页中创建一个 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>
4

2 回答 2

0
<Animations>
 <OnShown><Fadein Duration="0.50" /></OnShown>
        <OnHiding><Fadeout Duration="0.75" /></OnHiding>
</Animations>
于 2015-03-07T04:40:57.997 回答
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;
} 
于 2015-03-09T04:29:47.437 回答