I have reviewed posts about this issue but none of solutions seem to work for me.
I have a js file with jquery scripts which is loaded in head section of the page
I have also an updatepanel which holds a child usercontrol where my trigger button is placed. The updatepanel is updated when a child button is clicked correctly.
Everything works fine except that jquery doesn't work anymore.
I found info that $(document).ready does not work on partial postback so it is the case of my updatepanel.
I have also found information that adding path with ScriptReference can work so I added this to my Page_Load of the usercontrol holding UpdatePanel:
ScriptReference sr = new ScriptReference("~/js/jquerycripts.js");
ScriptManager.Scripts.Add(sr);
But it doesn't work either.
Not sure what else to try.
Any advice would be helpful.
Thank you
You can use this code instead of $(document).ready(YourFunctionName);
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(YourFunctionName)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With