title: Control directive reporting "A namespace does not directly contain members such as fields or methods"
body: <p>I'm trying to build an ASP.NET project and I have a control who's source page, currently, has no markup and just a control directive:</p>
  
  <pre><code>&lt;%@Control language="C#" CodeFile="SummaryEventFeed.ascx.cs" Inherits="SummaryEventFeedControl"%&gt;
  </code></pre>
  
  <p>When I build (using msbuild or Visual Studio) it points to that line and says:</p>
  
  <blockquote>
    <p>Error 240 A namespace does not
    directly contain members such as
    fields or methods</p>
  </blockquote>
  
  <p>There's obviously no namespace here, so the error message is quite puzzling.  The codefile also doesn't specify a namespace - it's just a public partial class.</p>
  
  <p>Ideas welcome.</p>
  
  <p>Thanks,
  Tom</p>