I've tried using the UpdatePanelAnimationExtender that is part of the Ajax Control Toolkit, but the biggest complaint I have with it is that it doesn't wait for your animation to finish before loading in the new content.
I would like to do something like the following:
- Start Async request to server
- Fade out the content in the UpdatePanel completely
- Once the UpdatePanel is completely faded out and the new content is returned, load in the new content
- Fade in the UpdatePanel
I can put the following code on the trigger that starts the postback:
OnClientClick="Sys.WebForms.PageRequestManager.getInstance().add_pageLoading(PauseForFade); FadeOut();"
With that I can also have the following JavaScript that will cancel any further processing:
function PauseForFade(sender, args) { args.set_cancel(true); }
My problem is that I can't figure out how to resume the loading once my fade animation is done. Any help would be appreciated.