@ Reference Control in .aspx, but class not found in respective aspx.cs
<p>Hopefully the title made at least some sense.</p>

<p>I've been fiddling with ASP.NET and C# for the first time today - following a tutorial.  I have comfortably got as far as <a href="http://asp.net-tutorials.com/user-controls/using/" rel="nofollow">this</a>; however, when I try to implement:</p>

<pre><code>&lt;%@ Reference Control="~/UserInfoBoxControl.ascx" %&gt;
</code></pre>

<p>and</p>

<pre><code>UserInfoBoxControl userInfoBoxControl = (UserInfoBoxControl)LoadControl("~/UserInfoBoxControl.ascx");
userInfoBoxControl.UserName = "John Doe";
userInfoBoxControl.UserAge = 78;
userInfoBoxControl.UserCountry = "Spain";
UserInfoBoxPH.Controls.Add(userInfoBoxControl);
</code></pre>

<p>I get</p>

<pre><code>The type or namespace name 'UserInfoBoxControl' could not be found...
</code></pre>

<p>My Java background makes me now want to 'import' this control class with <code>using</code>, although I understand the <code>@ Reference</code> does this job.  I've attempted some rudimentary troubleshooting by eliminating code from earlier in the tutorial, but with no luck.  From what I've read elsewhere, the code looks all okay, so I'm a bit confused and keen to move on in my tutorial :)</p>

<p>Thanks!</p>

<p><strong>Edit:</strong></p>

<p>I'm still at this hurdle, so I thought it would ultimately be easiest to just dump all my code:</p>

<p><a href="http://pastebin.com/embed_iframe.php?i=CDsga2Rg" rel="nofollow">Default.aspx</a></p>

<p><a href="http://pastebin.com/embed_iframe.php?i=D1YqTPwK" rel="nofollow">Default.aspx.cs</a> (the error occurs when declaring <code>userInfoBoxControl</code>)</p>

<p><a href="http://pastebin.com/embed_iframe.php?i=RKnHsuGa" rel="nofollow">UserInfoBoxControl.ascx</a></p>

<p><a href="http://pastebin.com/embed_iframe.php?i=GFndPyJ1" rel="nofollow">UserInfoBoxControl.ascx.cs</a></p>
