UpdatePanel Animation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StevieMars
    New Member
    • Mar 2010
    • 21

    UpdatePanel Animation

    I have a list of buttons with an update panel underneath. When you click one of the buttons the update panel will refresh with different content. I have this working fine but I want to make it look nice with some jQuery animation so when you click the button the update panel refreshes and the content slides down.

    Any javascript that I attach to the buttons seems to fire before the update panel is refreshed.

    What is the best way to achieve this? Should I use something other than an update panel?
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I have no experience using JQuery but I plan on checking it out the first chance I get.

    There is a free ASP.NET Ajax Control Toolkit available that has an UpdatePanelAnim ationExtender which will let you specify animations for when the update panel is updating and when it is returning.



    Please note that this ToolKit uses the Microsoft Ajax library...it's not JQuery.


    This extender is a little weird from what I remember. I believe that the animation that you specify for when the request is sent to the server is played for all UpdatePanels. The reason for this is there is no way for you to determine which UpdatePanel is causing the asynchronous postback using the Micirosoft Ajax Library (which the toolkit is based upon).

    Keep this in mind when you're developing your animations.

    (I ended up tearing this apart once and figuring out a way around the problem...but the task was pretty messy, involved a lot of research and it also involved accessing private members of events that aren't meant to be accessed by outside code)

    -Frinny

    Comment

    Working...