Wednesday, October 23, 2013

AnimationExtender Animation using JSON not working (ASP.NET)

When setting animations for AnimationExtender control using JSON/Javascript, setting the AnimationTarget with the explicit control id such as panel ID does not work when rendered to browser specified by the code below:
The workaround is to get the clientID of the panel control rendered through the browser. Below is the workaround code:
   1:  //Note: this is just a fragment of the JSON animation  
   2:  //the actual animation might be a little bit specific than this.  
   3:  var animation = "AnimationTarget":"' 
   4:  + '<%= panelDescription.ClientID %>' + '","AnimationChildren"';  
   5:  //set click behavior  
   6:  animationExtender.set_OnClick(animation);


Post a Comment