due to AsyncPostBackTrigger ControlID="button1" on a button1
window.onload = function () {
alert("test");
}
doesnot get executed secondtime without full post back
window.onload as name suggests is triggered when window is loaded. updatepanel loads part of page.
You can call javascript function on updatepanel reload using scriptmanager
http://www.dotnetcurry.com/ShowArticle.aspx?ID=200
OR use UpdatePanel Trigger events
http://www.aspsnippets.com/Articles/Detect-ASP.Net-Asynchronous-PostBack-using-PageRequestManager-Events-in-JavaScript.aspx
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.