jquery(document.ready()) and updatepanel

When you use updatepanel . and your update panel partial post back to server. your jquery document ready won't be executed.

To Work around this we add another call to your logic after end request of requestmanager

It works like a charm

ex:Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                        function EndRequestHandler(sender, args) {
                            if (args.get_error() == undefined) {
                                DoOnload();


                            }
                        }

 Thanks to this article.

http://blog.dreamlabsolutions.com/post/2009/02/24/jQuery-document-ready-and-ASP-NET-Ajax-asynchronous-postback.aspx

 

Share this post: | | | |
Published Tuesday, September 29, 2009 1:05 PM by cipto

Comments

No Comments