Well, I have already stared at this head for almost five hours, so I think it is time to ask.
I am working on a web application (.NET 4.0, C #, ASP.NET, AJAX, jQuery) in Visual Studio 2010 (Professional), which has several parts. Let me name them Mo, Larry and Curly, each of which is located in a subfolder of the project. Currently, each of them has several user controls that are stored in a subfolder called "Controls" under their specific folder, and all these controls are declared in the root web.config.
So, we have something similar:
WebApp - Web.config
--Mo
---- Management
--Larry
---- Management
--Curly
---- Controls
I’m trying to better “modulate” the web application and would like to be able (so far not having time) to move the User Control declaration into nested Web.configs so that they cannot refer to global ones. I tried to do this by simply moving the management declarations to Web.configs, which are in the folders named Stooge. Intellisense complains that they are not known elements, but it works until I try to make any changes to the pages (pages) that use the controls. As soon as I do this (even something as simple as clicking Enteron a new line), the designer contrives and removes the link to the control.
I tried web.configs in named folders, as well as sub Controls folders. I tried to include namespaces inside web.configs at both levels.
, ?
web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="curlyctrl"
src="~/Curly/Controls/NuykNuyk.ascx"
tagName="joke"/>
</controls>
</pages>
</system.web>
</configuration>