title: Getting namespace name not found for ASP.net user control
body: <p>So I'm having problems when I try to publish the website.
  I'm in visual studio 2008 sp1.</p>
  
  <p>I've got a bunch of user controls and on a few pages I'm using them programatically. </p>
  
  <p>I've got a reference on the aspx page</p>
  
  <pre><code>&lt;%@ Reference Control="~/UserControls/Foo.ascx" %&gt;
  </code></pre>
  
  <p>Then on the code behing I use</p>
  
  <pre><code>ASP.usercontrols_foo newFoo control = (ASP.usercontrols_foo)Page.LoadControl("~/UserControls/Foo.ascx");
  </code></pre>
  
  <p>If I navigate to the page it works fine, but when I goto publish the website I get a compile time error.</p>