title: PageMethods is not Defined in ASPX Page
body: <p>I'm looking at some old code that I can only assume worked at one time.</p>
  
  <p><strong>MyPage.aspx:</strong></p>
  
  <pre><code>function GetCompanyList(officeId) {
      var companyList = document.getElementById('&lt;%= CompanyDropDown.ClientID %&gt;');
      if (companyList.length == 0)
          PageMethods.GetCompanyList(officeId, OnGetCompanyList);
      else
          EditCompany();
  }
  </code></pre>
  
  <p><strong>And:</strong></p>
  
  <pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" /&gt;
  </code></pre>
  
  <p><strong>Code behind:</strong></p>
  
  <pre><code>[System.Web.Services.WebMethod()]
  [System.Web.Script.Services.ScriptMethod()]
  public IEnumerable&lt;CompanyMinimum&gt; GetCompanyList(int officeId) {
      return (
          from c in Repository.Query&lt;Company&gt;()
          where !c.IsDeleted &amp;&amp; c.TypeEnumIndex == (short)CompanyRelationshipType.Hotel
          select new CompanyMinimum() {
              id = c.Id,
              desc = c.Description
          }
      ).ToList();
  }
  </code></pre>
  
  <p>But at the call to <code>PageMethods.GetCompanyList()</code> in the first snippet, Chrome reports:</p>
  
  <blockquote>
    <p>PageMethods is not defined</p>
  </blockquote>
  
  <p>Can anyone see what has changed to prevent this from working?</p>
  
  <p><em>Note: I've found similar questions but they all seemed related to this code not working in master pages or user controls, which isn't the case here.</em></p>