Well, it really works ONCE you figure out how to do it…
On the app I’m currently developing, I was looking for some way to give visual feedback that a postback had occurred in an UpdatePanel. We use ASP.NET AJAX for most of the AJAX stuff we do, as to be honest, it’s easy and works well for what we need. Since I use small UpdatePanels to take care of most of the heavy lifting of AJAX, I wanted to just give a visual confirmation when a panel had been updated. In this case, the control was a CheckBoxList that is updated either via adding a new item to the list or by changing what’s checked on it.
The nice part was that once I actually figured out how to get the code working correctly, it was really easy to implement. A few things I found that may be obvious, but aren’t specifically stated:
- The target control HAS to be an UpdatePanel. I know it should seem obvious, but for some reason, it didn’t click in my head.
- As the Animation controls are actually XML markup, the tags must be CAPITALIZED. Specifically, I found that the <OnUpdating> and <OnUpdated> tags have to be capitalized, or the code returns a bit of a strange error.
- If you put an <OnUpdating> tag in your code, you HAVE to add an actual Animation to it. It can’t just be empty.
It must be said, the XML syntax for doing animation isn’t NEARLY as friendly to use as, say, jQuery UI, but once you get used to it, it works quite well.
I’d recommend you try it in order to make your applications that much more responsive.