Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using master and content page in asp.net. i load specific plugin JS file in a specific asp content page if required. i have update some data in update penal when page initial loads the plugins are working fine but when page is partially post back the plugin not working because at the time the JS files not loaded so the plugin not apply on each asp controls .
Please can you help me!
Thanks.

What I have tried:

i have load the JS fiel in updatepenal and just update the updatepenel on every partial post back but it's not working.
Posted
Updated 29-Nov-17 23:43pm
Comments
A_Griffin 30-Nov-17 4:06am    
There have been articles here on CP related to this which may help - try doing an article search for "jquery postback updatepanel". May help.

1 solution

This is most likely because you attach events to the elements when the page is loaded, but the updatepanel is deleting those elements and replacing them with new ones so all of the elements your events were attached to are now gone. There are different ways of handling this such as using delegate events in jQuery, or using an event exposed by the updatepanel to bind your events rather than using document.ready. As you haven't posted any relevant code we can't give specific help, but as suggested above google for it as it is a well-documented problem.

How to run javascript after updatepanel execution completed | The ASP.NET Forums[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900