单击按钮时在asp.net中使用ajax动画扩展器时出错 [英] error in using ajax animation extender in asp.net on button click

查看:68
本文介绍了单击按钮时在asp.net中使用ajax动画扩展器时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在按钮点击时使用ajax动画扩展器,当用户点击按钮时,会打开一个动画框,我可以在其中显示消息。现在这就是我所做的:

< asp:Button ID =Button1runat =serverText =SubmitValidationGroup =a

onclick =Button1_Click/>

感谢您为我们提供有价值的反馈!我们很快就会联系

。< asp:Panel ID =Panel4runat =server>



< ajaxToolkit:AnimationExtender ID =AnimationExtender1TargetControlID =Button1runat =server>

< animations>

< onclick>

< sequence animationtarget =Panel4>

< parallel animationtarget =flyoutduration =。3fps =25>

< move horizo​​ntal =150vertical = - 50 >

< resize height =260width =280>

< color animationtarget =flyoutpropertykey =backgroundColor> StartValue =#AAAAAAEndValue =#FFFFFF/>















但错误如下:

TargetControlID上的动画=Button1 使用不存在或无法设置的属性AjaxControlToolkit.AnimationExtender.onClick?为什么会这样?

I want to use ajax animation extender on button click that is when user clicks button a animated box opens in which i can show the message . now this is what i have done:
<asp:Button ID="Button1" runat="server" Text="Submit" ValidationGroup="a"
onclick="Button1_Click" />
Thank you for providing us your valueable feedback! We'll be in touch with
you soon.<asp:Panel ID="Panel4" runat="server">

<ajaxToolkit:AnimationExtender ID="AnimationExtender1" TargetControlID="Button1" runat="server">
<animations>
<onclick>
<sequence animationtarget="Panel4">
<parallel animationtarget="flyout" duration=".3" fps="25">
<move horizontal="150" vertical="-50">
<resize height="260" width="280">
<color animationtarget="flyout" propertykey="backgroundColor"> StartValue="#AAAAAA" EndValue="#FFFFFF" />







but error is coming as:
"Animation on TargetControlID="Button1" uses property AjaxControlToolkit.AnimationExtender.onClick that does not exist or cannot be set"? Why is it coming?

推荐答案

你应该尝试这样:



You should try out like this:

<asp:UpdatePanel runat="server" RenderMode="Inline">
                        <ContentTemplate>
                            <asp:Button ID="btnPost" runat="server"

                                Text="Validate and Post"

                                OnClick="btnPost_Click"

                                CssClass="modern socle"

                                Style="width: 150px; padding: 0px; height: 30px;" />
                        </ContentTemplate>
                    </asp:UpdatePanel>




<asp:Panel ID="PleaseWaitMessagePanel" runat="server" CssClass="modalPopup" Height="120px" Width="330px">
        Wait a moment...<hr />
        While we are sending your email to KS mail server.<br /><br />
        <img src="CSS_JS_Img/ContactUsForm/images/mailInOut.png" alt="" style="width: 20px; height: 20px" />
        <img src="CSS_JS_Img/ContactUsForm/images/win8_Preloader.gif" alt="Please wait" />
    </asp:Panel>
    
    <asp:Button ID="HiddenButton" runat="server" CssClass="hidden" Text="Hidden Button" ToolTip="Necessary for Modal Popup Extender" />
    <asp:ModalPopupExtender ID="PleaseWaitPopup" runat="server"

        TargetControlID="HiddenButton"

        PopupControlID="PleaseWaitMessagePanel"

        BehaviorID="PleaseWaitPopup"

        BackgroundCssClass="modalBackground">
    </asp:ModalPopupExtender>


您应该尝试这样:



You should try out like this:

<asp:UpdatePanel runat="server" RenderMode="Inline">
                    <ContentTemplate>
                        <asp:Button ID="btnPost" runat="server"

                            Text="Validate and Post"

                            OnClick="btnPost_Click"

                            CssClass="modern socle"

                            Style="width: 150px; padding: 0px; height: 30px;" />
                    </ContentTemplate>
                </asp:UpdatePanel>

    <pre lang="xml">&lt;asp:Panel ID=&quot;PleaseWaitMessagePanel&quot; runat=&quot;server&quot; CssClass=&quot;modalPopup&quot; Height=&quot;120px&quot; Width=&quot;330px&quot;&gt;
    Wait a moment...&lt;hr /&gt;
    While we are sending your email to KS mail server.&lt;br /&gt;&lt;br /&gt;
    &lt;img src=&quot;CSS_JS_Img/ContactUsForm/images/mailInOut.png&quot; alt=&quot;&quot; style=&quot;width: 20px; height: 20px&quot; /&gt;
    &lt;img src=&quot;CSS_JS_Img/ContactUsForm/images/win8_Preloader.gif&quot; alt=&quot;Please wait&quot; /&gt;
&lt;/asp:Panel&gt;

&lt;asp:Button ID=&quot;HiddenButton&quot; runat=&quot;server&quot; CssClass=&quot;hidden&quot; Text=&quot;Hidden Button&quot; ToolTip=&quot;Necessary for Modal Popup Extender&quot; /&gt;
&lt;asp:ModalPopupExtender ID=&quot;PleaseWaitPopup&quot; runat=&quot;server&quot;
    TargetControlID=&quot;HiddenButton&quot;
    PopupControlID=&quot;PleaseWaitMessagePanel&quot;
    BehaviorID=&quot;PleaseWaitPopup&quot;
    BackgroundCssClass=&quot;modalBackground&quot;&gt;
&lt;/asp:ModalPopupExtender&gt;</pre>


您应该尝试这样:



You should try out like this:

<asp:UpdatePanel runat="server" RenderMode="Inline">
                    <ContentTemplate>
                        <asp:Button ID="btnPost" runat="server"

                            Text="Validate and Post"

                            OnClick="btnPost_Click"

                            CssClass="modern socle"

                            Style="width: 150px; padding: 0px; height: 30px;" />
                    </ContentTemplate>
                </asp:UpdatePanel>


<asp:panel id="PleaseWaitMessagePanel" runat="server" cssclass="modalPopup" height="120px" width="330px" xmlns:asp="#unknown">
            Wait a moment...<hr />
            While we are sending your email to KS mail server.<br /><br />
        </asp:panel>

        <asp:button id="HiddenButton" runat="server" cssclass="hidden" text="Hidden Button" tooltip="Necessary for Modal Popup Extender" xmlns:asp="#unknown" />
        <asp:modalpopupextender id="PleaseWaitPopup" runat="server" xmlns:asp="#unknown">
            TargetControlID="HiddenButton" 
            PopupControlID="PleaseWaitMessagePanel" 
            BehaviorID="PleaseWaitPopup" 
            BackgroundCssClass="modalBackground">
        </asp:modalpopupextender>


这篇关于单击按钮时在asp.net中使用ajax动画扩展器时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆