Confused About AnimationExtender and UpdatePanel

Last post 06-19-2007 3:38 PM by orphicfireball. 6 replies.

Sort Posts:

  • Confused About AnimationExtender and UpdatePanel

    06-18-2007, 2:48 PM

    Can I not use the AnimationExtender inside of an UpdatePanel?

    Basically I would like to add animations to a wizard I have inside an UpdatePanel. I tried adding AnimationExtenders onto the WizardSteps but they didn't do anything. 

    Am I just doing it wrong, or do I need to use an UpdatePanelAnimationExtender with a lot of conditions to decide what to do on each step?

  • Re: Confused About AnimationExtender and UpdatePanel

    06-18-2007, 3:16 PM
    • Loading...
    • gt1329a
    • Joined on 06-23-2002, 8:53 PM
    • Atlanta
    • Posts 1,696

    You can target a control inside an UpdatePanel from an AnimationExtender that's outside the panel.  You can also give a specific control target for each action, using the AnimationTarget property.

  • Re: Confused About AnimationExtender and UpdatePanel

    06-19-2007, 12:05 AM

    Sounds great, however, there is a bigger problem. It appears that an AnimationExtender outside of a wizard cannot have its TargetControlID be set to a control inside of a Wizard (regardless of being in an UpdatePanel). I just get this:

     The TargetControlID of 'AnimationExtender1' is not valid. A control with ID 'Button1' could not be found.

    This should work, normally you can reference controls within a wizard. Is this a bug?

  • Re: Confused About AnimationExtender and UpdatePanel

    06-19-2007, 1:30 AM
    • Loading...
    • gt1329a
    • Joined on 06-23-2002, 8:53 PM
    • Atlanta
    • Posts 1,696

    Do a view source on that page in your browser, find the button, and use the ID it has there.  It won't be Button1, but probably something like Wizard1_something_Button1.

    Or, you can probably do that programmatically, by setting the AnimationExtender1.TargetControlID to Button1.ClientID in Page_Load.

  • Re: Confused About AnimationExtender and UpdatePanel

    06-19-2007, 1:02 PM

     Allow me to clarify. I'm talking about this TargetControlID:

                 <cc1:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="Button1">
                    <Animations>
                                 <OnClick>
                                     <Color AnimationTarget="asdf" propertyKey="backgroundColor" startValue="#FFFFFF" endValue="#000000"/>
                                 </OnClick>
                    </Animations>
                </cc1:AnimationExtender>

    As it turns out the AnimationExtender cannot reference a TargetControlID that is inside of a wizard. This does work if the AnimationExtender and the TargetControl are inside of the same wizardstep. The UpdatePanel wasn't really my problem, it was this.
     

  • Re: Confused About AnimationExtender and UpdatePanel

    06-19-2007, 1:23 PM
    Answer
    • Loading...
    • gt1329a
    • Joined on 06-23-2002, 8:53 PM
    • Atlanta
    • Posts 1,696

    Declare the AnimationExtender with no TargetControlID in your .aspx.  Then, in your Page_Load method, add AnimationExtender1.TargetControlID = Button1.UniqueID.

    What happens is that your Button1 is becoming Wizard1_Button1 in the DOM of the page, so when the AnimationExtender tries to reference it with $get('Button1'), it can't find it.  For whatever reason, setting it to Wizard1_Button declaratively doesn't work either.  Setting it programmatically does work.

  • Re: Confused About AnimationExtender and UpdatePanel

    06-19-2007, 3:38 PM
    Answer

    Very interesting, I'm sure I'll be using that trick Smile.

     BTW, I should also note that, after testing this further, AnimationExtenders do work inside of Wizard that is inside of an UpdatePanel, my real problem was the other issue all along. Maybe this will have unexpected consequences, but its working for now.

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