title: How to call client script from User Control in ASP.Net?
body: <p>I have read many reference for this question but not getting result. So, I thought let me try to explain my scienario here.</p>
  
  <p>This is my 3 script which is in <code>view.ascx</code> control. I want to call it in <code>.cs</code> file function and in click event.</p>
  
  <p>view.ascx</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function startLoading() {
      alert("load start");
      var el = jQuery(".scp-entry-header");
      App.blockUI(el);
  }
  
  
  function stopLoading() {
      alert("load end");
      var el = jQuery(".scp-entry-header");
      App.unblockUI(el);
  }
  
  function getCalendarData() {
      alert("calendarcalled");
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>view.ascx.cs</p>
  
  <pre><code>//ViewData button click
  protected void btnGetData_Click(object sender, EventArgs e)
  {
      //How to call startLoading function here?
      process from database;
      //How to call stopLoading function here?
  }
  
  //simple function call
  protected void showCalendar()
  {
      //How to call getCalendarData function here?
  }
  </code></pre>
  
  <p>I have read about RegisterScript but not getting result. I don't understand where to RegisterScript and how to call it in function. </p>
  
  <p>Can anybody please suggest me in detail how can I call javascript function here? </p>