SharePoint 2013 Page layout error: Only Content controls are allowed directly in a content page that contains Content controls

I was working on SharePoint migration from 2010 to 2013 for a customer today. I checked some custom page layout using Visual studio 2013 and created a new page based on the page layout. Suddenly the publishing page throwing this error" Only Content controls are allowed directly in a content page that contains Content controls".

I double checked the page layout. There was no html elements inside it. Everything is placed under the ContentPlaceHolder.

The cause is improper case for the <asp:Content> control tags in my page layout.  A few contorls used a lowercase "c" instead of an uppercase "C" in the word content.  The page layout that had trouble had tags that looked like: <asp:content> instead of <asp:Content>

The specific offending tag is the one associated with the page title (<asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">). 

as well as asp:contentplaceholderId should be uppercase like this

<asp:contentplaceholderId="PlaceHolderPageTitle" runat="server"></asp:content

I changed the 'c' in the contentplaceholder tag to upper case like this

<asp:ContentPlaceholderID="PlaceHolderPageTitle" runat="server"></asp:Content

if deploying the solution has no result, open the layout using SP designer and modify the changes

Share on Google Plus

About Mohamad A Sallal

A Highly Experienced and Accomplished Senior SharePoint Specialist, Architect, Designer and Developer, with Significant Experience Providing Full Life-Cycle Solutions and Project Management. Web Application Professional Experienced with Diverse Web Technologies. Knowledge of Current Microsoft Technologies, Leveraging the .NET Platform. Broad knowledge Technical Combined with Project Leadership Ability and Creative Problem Solving Skills in both Strategic and Tactical Areas. Specialties: Developing on the Microsoft .NET platform
    Blogger Comment
    Facebook Comment


Post a Comment