title: The name 'ScriptManager' does not exist in the current context when calling JS function in Codebehind
body: <p>I need to call a JS function via codebehind when its no postback on a site. 
  I've added my script before the closing <code>&lt;head&gt;</code> Tag:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function StartWidgetTour() {
          //init the tour!
          wWidgetTour.init();
  
          //finally start the tour! strange but we have to restart.
          wWidgetTour.restart();
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>My Code looks like:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      if (!IsPostBack)
      {
          ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Widget Tour Start!", "StartWidgetTour()", true);
          //more code that already works
  </code></pre>
  
  <p>When I want to run this code, I get a built error <code>The name 'ScriptManager' does not exist in the current context</code>.</p>
  
  <p>I am already using namespace <code>System.Web</code> and <code>System.Web.UI;</code>. 
  The answers <a href="https://stackoverflow.com/questions/20941334/the-name-scriptmanager-does-not-exist-in-the-current-context">to this question</a> didn't worked for me. </p>
  
  <p>Thanks for any help!</p>