title: ScriptManager.RegisterClientScriptBlock Doesn't Call Existing Script
body: <h2>Background</h2>
  
  <p>I have a client-side button click that triggers a server-side function. Before the server side function is called, a loading panel is displayed (div).</p>
  
  <p>The loading panel needs to be removed once the server-side function has completed. </p>
  
  <h2>My Solution</h2>
  
  <p>After the server-side function is complete I will call a JavaScript function that will remove the div. So as a test i'm calling an alert script. I'm trying to do this from the master page.</p>
  
  <h2><em>Client-Side Code</em></h2>
  
  <p>My PopUp Function</p>
  
  <pre><code>    &lt;script&gt;
          function PopUp() {
          debugger;
          alert('TEST');
          }
       &lt;/script&gt;
  </code></pre>
  
  <p>My Script Manager</p>
  
  <pre><code> &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
   &lt;/asp:ScriptManager&gt;
  </code></pre>
  
  <h2><em>Server-Side Code</em></h2>
  
  <p>My Call after server side functions have completed.</p>
  
  <pre><code>//Add the script  after &lt;form&gt; tag
     bool isClientScriptBlockRegistered = ClientScript.IsClientScriptBlockRegistered("ShowStatus");
     if (!isClientScriptBlockRegistered)
     {
     ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "ShowStatus", "PopUp();", true);
     }
  </code></pre>
  
  <h2>Problem</h2>
  
  <p>My script isn't called by the server. No alert window is created. When I try to do this from any page other that the master page it works. However on the master page it does not.</p>
  
  <h2>Questions</h2>
  
  <p>Is there something I'm missing?</p>
  
  <p>Does there need to be a callback or some kind of refreshing of the page for the alert to appear, or can the server just call the script without any action from the client?</p>