Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Problem when adding ascx user control in the MasterPage: Parser Error Message: The referenced file ... is not allowed on this page.

$
0
0


Hello,

I have to maintain a SharePoint 2010 project, in which a TopNavigation User Control for SiteCollection is registered in the MasterPage in this way:

<%@ Register TagPrefix="ABC" TagName="TopNavigation" src="~/_layouts/ABCApplication/MainSite/Navigation/TopNavigation.ascx" %>

.

.

<asp:ContentPlaceHolder id="PlaceHolderTopNavBar" runat="server">
<asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server">
                                    <ABC:TopNavigation ID="TopNavi" XMLDataLocation="/_layouts/ABCApplicatopm/MainSite/TopNavigation.xml" IsRoot="true" runat="server" />
</asp:ContentPlaceHolder>
</asp:ContentPlaceHolder>

When I deploy the SiteCollection, the TopNavigation user control is working correctly. Unfortunately when i modify the masterpage over SharePoint Designer, the following error message comes allways, regardless of the art of changes i did in the MAsterPage ( even if I open the MasterPage, add an space and do save/close the MasterPage).

"Problem when adding user control in my custom master page, Parser Error Message: The referenced file '/_layouts/Navigation/TopNavigation.ascx' is not allowed on this page."

Any ideas?


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>