title: ScriptManager.RegisterClientScriptBlock from UserControl Of MasterPage
body: <p>I have master page. In master page I have one UserControl. In this UserControl I have one button . When I complete everything with this button event I want to call Javascript function from page. Below is my code : </p>
  
  <p><strong>Button Event</strong></p>
  
  <pre><code>    protected void btnAddCompany_Click(object sender, EventArgs e)
      {
          // Do something Here
  
          ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), Guid.NewGuid().ToString(), "alertmessage();", true);
      }
  </code></pre>
  
  <p><strong>Javascript Function On same UserControl</strong></p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
     function alertmessage() {
         alert("Call Successfull");
     }
   &lt;/script&gt;
  </code></pre>
  
  <p>But this javascript function never been called. When same UserControl is inside page it works. but if it is inside masterpage it doesn't.</p>