title: RegisterStartupScript in Masterpage.PageLoad() will not run on asynchronous postback in ContentPlaceHolder
body: <p>After searching online with multiple different keywords, I haven't been able to find the solution to my problem.</p>
  
  <p>I started by looking for a way to popup a message asking for a user to renew their session a minute before it cancels. The solution I decided to use was the run a javascript timer in the masterpage and have it be called on a Masterpage.Page_Load(). In this way, whenever my user navigates from page to page, they reset the timer. However, because many of the pages the user will be using have updatepanels and update asynchronously, the function I am using is being reached, but being skipped over (according to the debugger).</p>
  
  <p>The function I am using is:</p>
  
  <pre><code>ScriptManager.RegisterStartupScript(main, this.GetType(), "callTimer", "callTimer();", true);
  </code></pre>
  
  <p>This function runs fine on a regular postbacks, or asynchronous postbacks on the masterpage (I update the timer by doing a postback on a updatepanel in the masterpage), however, will be skipped on asynchronous postbacks.</p>
  
  <p>I have tried a few things, making the control of the function Page or the UpdatePanel in the masterpage or the updatepanel in the childpages. I have tried putting this code in the childpages as well, but while these change do reset the timer, it causes the javascriptcode to run multiple times and they fight over the label displaying the countdown.</p>
  
  <p>I'm really at a loss here. I think a possible solution would be to change the startupscript's control and terminate all javascripts running before that code again. However searching for a way to terminate, cancel or stop javascript functions programatically yields no useful results as well.</p>
  
  <p>Another solution I would be okay with is reseting the timer on mouse movement, but since I'm designing for IE8, this will not work unless the window is out of focus.</p>