Mittwoch, 13. Juli 2011

JQuery Ajax does not work after .NET Ajax request

I had the problem, that I was using an jquery ajax request on a website. I was using the document ready to initialize the function. When a .NET ajax request happend afterwards, the functionality of my jquery was not enabled anymore.

Solution of that was, to initialize the function to the Sys.WebForms.

It worked like that:

jQuery(document).ready(function () {

Myfunction();
load();
});

function load() {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(Myfunction);
}