title: 'Sys' is undefined - Ajax - master and contentpages ASP.NET 4.0
body: <p>I've been having this problem for quite a while now and tried various solutions, Editing the Webconfig with various tags.</p>
  
  <p>Im using Updatepanels, timers and AJAX on my webpage.(can it be AJAX that throws the error?)</p>
  
  <p>I really dont know how to define the problem, becuase i really dont know where to trace it.</p>
  
  <p>I've placed a onload on the body in the masterpage (dont know if thats right)
  Heres some markup code and my Javascript code that i think throws the error.</p>
  
  <p>MASTERPAGE:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head runat="server"&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;&lt;%: Page.Title %&gt; - &lt;/title&gt;
      &lt;link href="~/Content/Site.css" rel="stylesheet" /&gt; 
      &lt;link href="~/Content/BarChart.css" rel="stylesheet" /&gt;
      &lt;link href="favicon.ico" rel="shortcut icon" type="image/x-icon" /&gt;
      &lt;asp:PlaceHolder runat="server"&gt;        
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/_references.js") %&gt;"&gt;&lt;/script&gt;
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/modernizr-2.5.3.js") %&gt;"&gt;&lt;/script&gt;
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/jquery-1.7.1.js") %&gt;"&gt;&lt;/script&gt;
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/jquery-1.7.1.min.js") %&gt;"&gt;&lt;/script&gt;
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/jquery-ui-1.8.20.js") %&gt;"&gt;&lt;/script&gt;
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/jquery-ui-1.8.20.min.js") %&gt;"&gt;&lt;/script&gt;
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/ButtonManager.js") %&gt;"&gt;&lt;/script&gt;
          &lt;script src="&lt;%: ResolveUrl("~/Scripts/BarChart.js") %&gt;"&gt;&lt;/script&gt;
      &lt;/asp:PlaceHolder&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;asp:ContentPlaceHolder runat="server" ID="HeadContent" /&gt;
  &lt;/head&gt;
  &lt;body &gt;
      &lt;form runat="server"&gt;
      &lt;asp:ScriptManager runat="server"&gt;
          &lt;Scripts&gt;
              &lt;asp:ScriptReference Name="jquery" /&gt;
              &lt;asp:ScriptReference Name="jquery.ui.combined" /&gt;
          &lt;/Scripts&gt;
      &lt;/asp:ScriptManager&gt;
      &lt;header&gt;
          &lt;div class="content-wrapper"&gt;
              &lt;div class="float-left"&gt;
                      &lt;asp:ImageButton ID="Logo" cssclass="site-title" runat="server" PostBackUrl="~/" ImageUrl="~/Images/Logo.png" /&gt;
              &lt;/div&gt;
              &lt;div class="float-right"&gt;
                  &lt;section id="login"&gt;
                      &lt;asp:LoginView runat="server" ViewStateMode="Disabled"&gt;
                          &lt;AnonymousTemplate&gt;
                              &lt;ul&gt;
                                  &lt;li&gt;&lt;a id="registerLink" runat="server" href="~/Account/Register.aspx"&gt;Register&lt;/a&gt;&lt;/li&gt;
                                  &lt;li&gt;&lt;a id="loginLink" runat="server" href="~/Account/Login.aspx"&gt;Log in&lt;/a&gt;&lt;/li&gt;
                              &lt;/ul&gt;
                          &lt;/AnonymousTemplate&gt;
                          &lt;LoggedInTemplate&gt;
                              &lt;p&gt;
                                  Hello, &lt;a runat="server" class="username" href="~/Account/Manage.aspx" title="Manage your account"&gt;
                                      &lt;asp:LoginName runat="server" CssClass="username" /&gt;
                                  &lt;/a&gt;!
                                  &lt;asp:LoginStatus runat="server" LogoutAction="Redirect" LogoutText="Log off" LogoutPageUrl="~/" /&gt;
                              &lt;/p&gt;
                          &lt;/LoggedInTemplate&gt;
                      &lt;/asp:LoginView&gt;
                  &lt;/section&gt;
                  &lt;nav&gt;
                      &lt;ul id="menu"&gt;
                          &lt;li&gt;&lt;a runat="server" href="~/"&gt;Home&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a runat="server" href="~/Barchart.aspx"&gt;About&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a runat="server" href="~/Contact.aspx"&gt;Contact&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/nav&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/header&gt;
      &lt;div id="body"&gt;
          &lt;asp:ContentPlaceHolder runat="server" ID="FeaturedContent" /&gt;
          &lt;section class="content-wrapper main-content clear-fix"&gt;
              &lt;asp:ContentPlaceHolder runat="server" ID="MainContent" /&gt;            
          &lt;/section&gt;
      &lt;/div&gt;
      &lt;footer&gt;
          &lt;div class="content-wrapper"&gt;
              &lt;div class="float-left"&gt;
                  &lt;p&gt;&amp;copy; &lt;%: DateTime.Now.Year %&gt; - My ASP.NET Application&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/footer&gt;  
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>CONTENTPAGE:</p>
  
  <pre><code>&lt;asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent"&gt;
  &lt;/asp:Content&gt;
  &lt;asp:Content runat="server" ID="BodyContentHome" ContentPlaceHolderID="MainContent" &gt;
      &lt;asp:Panel ID="UpdatepanelWrapper" CssClass="Updatepanelwrapper" runat="server"&gt;
          &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" &gt;
              &lt;ContentTemplate&gt;
                  &lt;asp:PlaceHolder runat="server" ID="WholeWrapper"&gt;
  
                      &lt;asp:PlaceHolder runat="server" ID="QuestionWrapper"&gt;
                          &lt;asp:PlaceHolder runat="server" ID="LabelQuestion"&gt;&lt;/asp:PlaceHolder&gt;
                          &lt;asp:PlaceHolder runat="server" ID="Question"&gt;&lt;/asp:PlaceHolder&gt;                        
                      &lt;/asp:PlaceHolder&gt;
                  &lt;/asp:PlaceHolder&gt;
              &lt;/ContentTemplate&gt;
              &lt;Triggers&gt;
                  &lt;asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" /&gt;
                  &lt;asp:AsyncPostBackTrigger ControlID="btnDelete" EventName="Click" /&gt;
              &lt;/Triggers&gt;
  
          &lt;/asp:UpdatePanel&gt;    
          &lt;asp:Panel ID="ButtonPanel" CssClass="ButtonPanel" runat="server"&gt;
              &lt;asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/Images/Deleteicon.png" CssClass="DeleteButtonHidden" OnClientClick="btnDelete_Click" /&gt;
              &lt;asp:ImageButton ID="btnAdd" runat="server" ImageUrl="~/Images/Addicon.png" CssClass="AddButtonMoreMargin" OnClientClick="btnAddQuestion_Click" /&gt;
          &lt;/asp:Panel&gt;
          &lt;/asp:Panel&gt;  
      &lt;asp:Button ID="btnSendQuestions" runat="server" Text="Skapa Föreläsning och frågor" OnClick="btnSendQuestions_Click" ValidationGroup="QuestionGroup" /&gt;
  
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>JAVASCRIPT CODE:</p>
  
  <pre><code>if (window.addEventListener) window.addEventListener("load", load(), true);
  else window.onload = load();
  
  function load() {
      Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
  }
  
  function EndRequestHandler(sender, args) {
  // NOT IMPORTANT
  }
  </code></pre>