Monday, February 9, 2009

JQuery event is not working after updatepanel update

After each AJAX Asynchronous method call we have to register the script block. This can be done using the below statements.

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
    
function EndRequestHandler()
{
//JQuery event registration of your script code
}

1 comment:

Anonymous said...

Hi I have try this code in my application to do better performance but fail here is the code. please guide me if any thing wrong in it.

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler() {
//$(document).ready(function() {
$("#ind").click(function() {
$(".industry_hide").toggleClass("industry_unhide", 100);
$("#ind_s").text($("#ind_s").text() == 'Show less...' ? 'Show more...' : 'Show less...');
return false;
});
}