Просто хотел добавить код для этого ответа, так как мне удалось найти хорошее решение для этого, используя код из разных мест. :) (некоторые были вставлены, некоторые отредактированы; окончательная версия этого не проверена, но вы должны быть в состоянии получить идею из этого!)
var postbackElement; // Global to store the control that initiated the postback
// Using JQuery here
$(document).ready(function()
{
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);
});
function beginRequest(sender, args)
{
postbackElement = args.get_postBackElement();
// This method can be used to do animations in place of OnUpdating
if(postbackElement.id == "YourControlId")
{
// or something like: if(id == "<%= YourControl.ClientID %>")
// run your animation here
}
}
function pageLoaded(sender, args)
{
// This method can be used to do animations in place of OnUpdated
// Also, the args variable holds a list of panels that are being updated;
// I didn't use this though.
// This condition is true on the first page load
if (typeof(postbackElement) === "undefined")
{
return;
}
if(postbackElement.id == "YourControlId")
{
// run your animation here
}
}