I'm not sure what you want to do, but I suspect delegated events are probably your answer.
Delegated events have the advantage that they can handle events from descendant elements that will be added to the document later. By selecting an item that is guaranteed to be present during the attachment of a delegated event handler, you can use delegated events to avoid having to attach and remove event handlers frequently.
For example, you can add functionality to all text areas no matter when they are added to the page using
$( "body" ).on( "click", "textarea", function() { alert( $( this ).val() ); });
The first advantage of your situation is that any text field added to the update panel at any time will receive delegated functions.
In addition, if you want to target behavior in the text box inside the update panel as well as outside the update panel, you can also do this.
$("body").on('click', 'textarea', function () { alert( "outside" + $(this).val()); }); $(".update-panel").on('click', 'textarea', function () { alert("inside: " + $(this).val());
Also, note that when executing this code, only body and upload-container tags should be ready. A text area is not required, so you do not need to run it inside Sys.Application.add_load .
source share