Child web.config can't clear <pages><controls> from parent web.config

Posted by Lance Rushing on Stack Overflow See other posts from Stack Overflow or by Lance Rushing
Published on 2010-04-13T22:18:41Z Indexed on 2010/04/13 22:23 UTC
Read the original article Hit count: 763

Filed under:

How can I "clear" the vendor defined <controls> in my child app's web.config?

Parent Web Config.

<system.web>
    <pages>
        <controls>
             <!-- START: Vendor Custom Control -->
             <add tagPrefix="asp" namespace="VENDOR.Web.UI.Base" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral />
             ...
             <!-- END: Vendor Custom Control -->
             ...
           </controls>
       <tagMapping>
         <add tagType="System.Web.UI.WebControls.WebParts.WebPartManager" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager" />
         <add tagType="System.Web.UI.WebControls.WebParts.WebPartZone" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone" />
       </tagMapping>
     </pages>
</system.web>

Child:

<system.web>
    <pages>
        <controls>
            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </controls>
        <tagMapping>
            <clear/>
        </tagMapping>
    </pages>
</system.web>

I have it working for the <tagMapping> section, but <controls> does not support <clear/> (or ).

© Stack Overflow or respective owner

Related posts about ASP.NET