Interesting issue. I am creating Page Layouts in Visual Studio 2015 for SharePoint 2016 (with Visual Studio Tools preview 2) and when I deploy the solution in Visual Studio and create a page, I get the "Only Content controls are allowed directly in a content page that contains Content controls."

But when I upload the .aspx file directly into the Masterpage Gallery, it works fine. What could be the issue?


1 Answer 1


Many times the cause is improper case for the <asp:Content>.

  1. Make sure you have used <asp:Content> instead of <asp:content>.
  2. Also check your <asp:Content> has correct ContentPlaceHolderID.
  3. Check there are no white spaces around <asp:Content>.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.