Skip to content

Instantly share code, notes, and snippets.

@umair-me
Last active October 16, 2018 10:25
Show Gist options
  • Save umair-me/6587647 to your computer and use it in GitHub Desktop.
Save umair-me/6587647 to your computer and use it in GitHub Desktop.
Bind javascript funtions after ajax postback
function BindEvents()
{
// Here your js function calls go
}
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(BindEvents);
--- OR---
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
BindEvents();
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment