.Net 2.0, UserControl in a subfolder won't compile

G

Guest

Hi all,

Have an issue in VS 2005 that I can't seem to sort out. I have a couple of
UserContols that I would like to have in a Controls subfolder off my
application root. The problem is that when the files are in that folder, I
get several build errors, all along the lines of "The type or namespace name
'____' does not exist in the namespace '__________.___________' (are you
missing an assembly reference?", anywhere that I try to load them.

The thing is, if I have the files located under my application root, they
build and work just fine. Any suggestions? Thanks!
 
P

PeterKellner

by default, the only code that will get compiled is what is in the root and
in the app_code subdirectory. If you want to add other files, you need to
add to web.config:

<compilation>
<codeSubDirectories>
<add directoryName="CSFolderForUserControls" />
</cod....
</compil...

Hope that helps

Peter Kellner
http://peterkellner.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top