You've checked your namespaces and references a hundred times but you're still getting this
annoying error when accessing code files in a sub-folder?
There is more than one cause of this error, for example, you will sometimes see it when
attempting to use the App_Code folder within an ASP.NET 2.0 Web Application project.
On this particular occassion, we are building an ASP.NET 2.0 Web Application project in C#
using VS 2005. The folder containing the code file is just a regular folder, but the same
error message appears.
Here's a fix that might work for you. Right-click the file you are trying to access in
Solution Explorer.
Select Properties which will open the Properties window. Go to the Build Action DropDown
menu.
Select 'Compile' for the build action. In this case, it had been to be set to 'Content'.
Now compile as normal and you should be able to reference the file.