There are problems for me when using UpdatePanels and jQuery (without problems with MVC, which does not have a page life cycle and is truly stateless). For example, the useful jQuery idiom
$(function() {
});
used to enhance the DOM or to attach to the DOM elements may not interact very well with the ASP.NET PostBack model if there are UpdatePanels on the page. So far I will get around it with the following code snippet
if (Sys.WebForms.PageRequestManager) {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() {
$('#updateListView1').trigger("gridLoaded");
});
}
where gridLoadedwill be the replacement of $(document).ready.I think you need to be very careful and know the ASP.NET Page / Controls life cycle very well in order to mix both technologies.
source
share