title: Internet Explorer 11 gives script error in PageRequestManager.js
body: <p>I'm using ASP.NET 4.5 on the server and I have a .NET Windows application with a Web Browser control that navigates to the web page on the server.</p>
  
  <p>If I run the Windows application on a system with Internet Explorer 11, I get a script error: "Object doesn't support property or method 'attachEvent'" when navigating to another page. The script file is ScriptResource.axd so it isn't any of my scripts.</p>
  
  <p>I do know that Internet Explorer 11 doesn't support attachEvent anymore (replaced with attachEventListener?). That is however not of much help here, as the javascript is part of the framework, not in my code.</p>
  
  <p>I found the javascript source for the framework here:
  <a href="http://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#Client/MicrosoftAjax/Extensions/Sys/WebForms/PageRequestManager.js">http://ajaxcontroltoolkit.codeplex.com/SourceControl/latest#Client/MicrosoftAjax/Extensions/Sys/WebForms/PageRequestManager.js</a></p>
  
  <pre><code>// DevDiv Bugs 100201: IE does not set referrer header on redirect if you set window.location, inject anchor node instead
  // dynamic anchor technique only works on IE
  if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
      var anchor = document.createElement("a");
      anchor.style.display = 'none';
      // cancel bubble so body.onclick is not raised
       anchor.attachEvent("onclick", cancelBubble);
      // more code...
  }
  </code></pre>
  
  <p>This is the Sys.Webforms.PageRequestManager module that is part of the core ASP.NET framework as far as I understand.</p>
  
  <p>The line that performs <strong>attachEvent</strong> gives script error on Internet Explorer 11, but works great on older versions of Internet Explorer.</p>
  
  <p>How to fix this problem? Are there any known workarounds? I couldn't fine any updates for this.</p>