javascript - jQuery outside of a asp.net update panel -


i have asp.net page using , update panel , including javascript via {script src=abc.js} tag. have tried loading javascript using both $(document).ready , $(window).load. both fire on initial load fail fire on update panel postback.

is there can wire client side fire regardless of update panel? know can inject script server side ideally want client side , wire ever needed first time around.

if want register code run on updatepanel postback, need register function called when update occurs. can register javascript function run doing following:

// javascript function initializescripts() {     var prm = sys.webforms.pagerequestmanager.getinstance();     prm.add_pageloaded(yourjavascriptfunctionyouwanttorun); } 

the pagerequestmanager call javascript function when updatepanel refreshes.

i have used in past cause trigger when updatepanel fired refresh due timer. when refresh completed, scripts automatically run update other controls based on data displayed.

see msdn article more information.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -