<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Web Forms</title><link>http://forums.asp.net/18.aspx</link><description>All about building ASP.NET Pages - server controls, events, validation, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Register User Control in subfolder web.config</title><link>http://forums.asp.net/thread/3001557.aspx</link><pubDate>Thu, 12 Mar 2009 07:06:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3001557</guid><dc:creator>Gary yang - MSFT</dc:creator><author>Gary yang - MSFT</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3001557.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=3001557</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;dsa1971:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;&amp;nbsp;Is it possble to register a user control in a web.config that is located in a subfolder of the website&amp;#39;s root web.config?&amp;nbsp; If I register it in the root web.config with a prefix of &amp;quot;xx&amp;quot; it works fine when I drag it on a page.&amp;nbsp; But, if I register it in a web.config in a subfolder it does not.&amp;nbsp; It will just register it on the page with the prefix &amp;quot;uc1&amp;quot;&amp;nbsp; I&amp;#39;m guessing this is just how it is setup in asp.net&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Based on my expeience, if you want to regist the control in web.config avoid registing it in every page. I think you should notice the following options:&lt;/p&gt;
&lt;p&gt;1. To regist the control in web.config, it doesn&amp;#39;t accept the relate path. you should add the User control to the sub folder.&lt;/p&gt;
&lt;p&gt;2. You should locate the web.config and the user control in different place.&lt;/p&gt;
&lt;p&gt;3. The page will execute the latest config file and apply the relate policy to it. this is the reason that it allow one or more config file in one project.&lt;/p&gt;
&lt;p&gt;How to regist the user control in web.config, please refer to the following links:&lt;/p&gt;
&lt;p&gt;1. &lt;a href="http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;a href="http://msdn.microsoft.com/en-us/library/4saat087.aspx"&gt;http://msdn.microsoft.com/en-us/library/4saat087.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Register User Control in subfolder web.config</title><link>http://forums.asp.net/thread/2994097.aspx</link><pubDate>Mon, 09 Mar 2009 19:51:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2994097</guid><dc:creator>Segundo</dc:creator><author>Segundo</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2994097.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2994097</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;If you register the user controls in the web.config.. you can use inside any subfolder ... it should work.&lt;/p&gt;&lt;p&gt;The error you are having can be originated because the page is not getting the last info refreshed from the web.config... to solve this issue, you can generate your project again... perhaps you should also close the page at the visual studio y open it again... sometimes, this issue is solved closing and reopening again the visual studio.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Any doubt, post your comment. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Register User Control in subfolder web.config</title><link>http://forums.asp.net/thread/2993765.aspx</link><pubDate>Mon, 09 Mar 2009 17:40:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2993765</guid><dc:creator>dsa1971</dc:creator><author>dsa1971</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2993765.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=2993765</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Is it possble to register a user control in a web.config that is located in a subfolder of the website&amp;#39;s root web.config?&amp;nbsp; If I register it in the root web.config with a prefix of &amp;quot;xx&amp;quot; it works fine when I drag it on a page.&amp;nbsp; But, if I register it in a web.config in a subfolder it does not.&amp;nbsp; It will just register it on the page with the prefix &amp;quot;uc1&amp;quot;&amp;nbsp; I&amp;#39;m guessing this is just how it is setup in asp.net&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>