title: EPiServer: CS1061: 'System.Web.UI.Control' does not contain a definition for 'CurrentPage' ...?
body: <p>have a little problem with this EPIServer error:
  CS1061: 'System.Web.UI.Control' does not contain a definition for 'CurrentPage' and no extension method 'CurrentPage' accepting a first argument of type 'System.Web.UI.Control' could be found (are you missing a using directive or an assembly reference?)</p>
  
  <p>when i try to access a method with a parameter from my ascx file. 
  The ascx file:</p>
  
  <pre><code>&lt;div id="nav"&gt;
      &lt;ul role="menu"&gt;
        &lt;li &lt;%# GetMenuClass(Container.CurrentPage)%&gt; role="menuitem"&gt;
              &lt;%= GetNewsPage %&gt;
              &lt;%--&lt;a href="#"&gt;News&lt;/a&gt;--%&gt;
          &lt;/li&gt;
          &lt;li &lt;%# GetMenuClass(Container.CurrentPage) %&gt; role="menuitem"&gt;
              &lt;%= GetClientPage %&gt;
              &lt;%--&lt;a href="#"&gt;Clients&lt;/a&gt;--%&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The method in codebehind:</p>
  
  <pre><code>protected string GetMenuClass(PageData page)
      {
  
  
          if (page.IsSelected(CurrentPage))
          {
              return "class=\"menu-item selected\"";
          }
  
          return "class=\"menu-item\"";
      }
  </code></pre>
  
  <p>what i want to achieve is something like this (if news page is selected):</p>
  
  <pre><code>&lt;div id="nav"&gt;
  &lt;ul role="menu"&gt;
  &lt;li class="menu-item selected" role="menuitem"&gt; News &lt;/li&gt;
  &lt;li class="menu-item" role="menuitem"&gt;
  &lt;a href="#"&gt;Clients&lt;/a&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>I'm greatful if some one can help.</p>