The easiest way is to use the MSAjax pageLoad Event in your javascript code:
<script> ///<summary> /// This will fire on initial page load, /// and all subsequent partial page updates made /// by any update panel on the page ///</summary> function pageLoad(){ alert('page loaded!') } </script>
I used it many times, it works like a charm. The most important thing is not to confuse it with the document.ready function (which will be executed only once after the Document Object Model (DOM) page is ready to execute JavaScript code), but the pageLoad event will be executed every time the refresh panel refreshes.
Source: Running script after asp.net AJAX update panel
Kartikay Tripathi Jun 07 '13 at 18:18 2013-06-07 18:18
source share