Update panel remove my jQuery

An UpdatePanel completely replaces the contents of the update panel on an update. 
This means that those events you subscribed to are no longer subscribed because there are
new elements in that update panel. So you need to re-subscribe every update.

<script language="javascript" type="text/javascript">

            $(document).ready(function() {


            var prm = Sys.WebForms.PageRequestManager.getInstance();

            prm.add_endRequest(function() {
                var script = document.createElement('script');
                script.src = '/js/jscript.js';
                script.type = 'text/javascript';

            }); </script>

ref: http://stackoverflow.com/questions/256195/jquery-document-ready-and-updatepanels

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s