I am using this to run a function after an updatepanel, which works fine.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(scroll_models);
Is is possible to build a function during the updatepanel update and then run it?
Please let me know.
apu808:
I am using this to run a function after an updatepanel, which works fine.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(scroll_models);
Is is possible to build a function during the updatepanel update and then run it?
Please let me know.
Hi.
here you can see all the Events of PageRequestManager .Link , the look at pageLoaded event may that you need.
Regards.
I think you have to use
Sys.WebForms.PageRequestManager.getInstance().add_pageLoading(pageLoadingHandler)
See the link for details
http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/PageRequestManagerPageLoadingEvent.aspx
I was trying to do something fairly similar and what I ended up doing may be a hack to some, but I love the power of it. It is a User Control that on Page_Load creates javascript, and contains a boolean value that is available from the client and server to let the client know when to run the script.
This allowed me to always have the script loaded in the startup and it cheks the boolean before performing the other script. I was having trouble with multiple Update Panels and all of them needing to be able to update and call the same Javascript, but modify on the postback of the Update Panels and this allowed for that.
No comments:
Post a Comment