title: How can I enable JavaScript in the WebBrowser-Control?
body: <p>Im trying to connect to a website and for that I need a "browser" which has (enabled) JavaScript, otherwise the server denies the connection (in the HTML file stands sth like "...enable JavaScript to see full page..."). Has someone an idea how can activate JavaScript?</p>
  
  <pre><code>void connect (string url){
    WebBrowser wb = new WebBrowser();
    //this enables JavaScript?
    wb.ObjectForScripting = true;      
  
    wb.Navigate(new Uri(url));
  
    //I know this could be an endless while 
    while (wb.ReadyState != WebBrowserReadyState.Complete)
    {
      System.Windows.Forms.Application.DoEvents();
    }      
  
    HtmlDocument doc = wb.Document;
  
    Console.Write(wb.DocumentText);
  }
  </code></pre>