Joseph Michael Pesch
VP Programming

jQuery Document.Ready Doesn't Work with ASP.Net UpdatePanel

by 27. July 2013 21:47

When using an ASP.Net UpdatePanel you may need to use the PageRequestManager to bind functions that would otherwise be bound on the page load or jQuery Document.Ready function (see below).  Link to blog article on this topic: http://stackoverflow.com/questions/256195/jquery-document-ready-and-updatepanels 

$(document).ready(function() {
    // bind your jQuery events here initially
});

var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(function() {
    // re-bind your jQuery events here
});

Tags:

ASP.Net | JQuery

Comments are closed