Solving: Only Content controls are allowed directly on a content page
I have faced this error Only Content controls are allowed directly in a content page with SharePoint Page Layout that was not well-formatted!
In my case, the issue occurred due to there being auto-generated tags added (<HTML> & <body> content
) after </asp:content>
, so try to remove all the spaces, and line breaks after the last closing tag.
Also, to avoid this error Only Content controls are allowed directly in a content page, try to do the following cases: