Animation Extender and server side validation

Last post 09-03-2008 12:33 PM by Simer. 1 replies.

Sort Posts:

  • Animation Extender and server side validation

    11-30-2006, 5:37 PM
    • Loading...
    • SirSceptre
    • Joined on 11-30-2006, 10:16 PM
    • Posts 7

    What I'm trying to do is activate an animation only if the page is valid.  It seems that the animation extender only allows client side conditions.  What I'm trying to do is once a submit a form inside of an update panel.  If the form is valid, then run an animation.  In my server side code, I test to see if the page is valid.  If it is not, I have set the ae.Enabled property to false.  This doesn't seem to work.  In fact, if my asp validators are set with the attribute of EnableClientScript="false" then my animation doesn't work at all.. The animation starts but then the post back occurs and stops the animation.  I need it to post back and then start the animation, if the page is valid.  Is there anyway to do this without setting the Animation property inside of the page_load?

    Here is a sample of what I'm trying to do:

    <cc1:AnimationExtender id="ae" runat="server" TargetControlID="btnSubmitForm">
    <Animations>
    <OnClick>
    <Sequence AnimationTarget="pnlForm">
    <EnableAction Enabled="false" />
    <StyleAction AnimationTarget="pnlForm" Attribute="display" Value="block"/>
    <Parallel AnimationTarget="pnlForm" Duration=".5" Fps="30">
    <Move Horizontal="1500" Vertical="1550" />

    I have tried this in the Page_Load but the panel just disappears immediately

    Page.Validate();

    if (this.Page.IsValid)
    {
    ae.Animations =
    "<OnLoad>" +
    " <Sequence>" +
    " <EnableAction Enabled=\"false\" />" +
    " <StyleAction AnimationTarget=\"pnlForm\" Attribute=\"display\" Value=\"block\"/>" +
    " <Parallel AnimationTarget=\"pnlForm\" Duration=\".9\" Fps=\"30\">" +
    " <Resize Height=\"0\" Width=\"0\" Unit=\"px\" />" +
    " <FadeOut />" +
    " </Parallel>" +
    " </Sequence>" +
    "</OnLoad>";
    }

     


    <FadeOut />
    </Parallel>
    </Sequence>
    </OnClick>
    </Animations>
    </cc1:AnimationExtender>
  • Re: Animation Extender and server side validation

    09-03-2008, 12:33 PM
    • Loading...
    • Simer
    • Joined on 09-03-2008, 12:32 PM
    • Posts 1

    Hello

     I am trying to achieve a similar issue. Have you foud any solution to this? Please post.

     Thanks

Page 1 of 1 (2 items)
Microsoft Communities
Page view counter