Rebinding events in jQuery after Ajax update (updatepanel) Rebinding events in jQuery after Ajax update (updatepanel) asp.net asp.net

Rebinding events in jQuery after Ajax update (updatepanel)


Since you're using ASP.NET AJAX, you'll have access to a pageLoad event handler, that gets called each time the page posts back, be it full or partial from an UpdatePanel. You just need to put the function in to your page, no hooking up is required.

function pageLoad(sender, args){   if (args.get_isPartialLoad())   {       //Specific code for partial postbacks can go in here.   }}


Or you could check the latest jQuery's live functionality via the on() method.


Sys.Application.add_load(initSomething);function initSomething(){  // will execute on load plus on every UpdatePanel postback}