Is it possible to assign a different beginRequest function or endRequest function for individual UpdatePanels on a page? It appears that usingSys.WebForms.PageRequestManager.getInstance().add_beginRequest( someFunction ) assign the function to all UpdatePanels on the page.
Thank you
yeah, check this out...
http://dotnetslackers.com/community/blogs/simoneb/archive/2006/11/19/ASP.NET-Ajax-UpdatePanelNotifier_3A00_-get-notified-of-partial-updates.aspx
i have looked into alittle more.
<script type="text/javascript" language="javascript">
                Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
                Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function BeginRequestHandler(sender, args)
                {
                     var elem = args.get_postBackElement();
                     //What Triggered The Update
                     //alert(elem.id);
                }
                function EndRequestHandler(sender, args)
                {
                       var s = args.get_response().get_responseData().split('|');
                       //UpdatePanel Triggered
                       alert(s[2]);
                }
</script>
Thanks for the response. So there is currently no 'native' way do do this? Surprising. I'll check out this project.
Thanks again.
Interesting... It still would be nice to have a native way of assigning functions to different panels, but this could certainly be of use in certain circumstances.
Thanks!
No comments:
Post a Comment