3

I have SharePoint error in custom page layout

I checked this issue in SP logs and found this

Only Content controls are allowed directly in a content page that contains Content controls.
at System.Web.UI.FileLevelPageControlBuilder.AppendLiteralString(String text)
at System.Web.UI.TemplateParser.ProcessLiteral()

  • 1
    Somewhere in your page, you are using an element which is not allowed. Best you post the relevant part of your page so we can see what may be wrong. – helb Sep 17 '18 at 7:51
  • 1
    If you share the markup for the page layout we will be able to help better. – James Randal Sep 17 '18 at 7:53
  • Yes its working fine now I changed the content place holder elements from <asp:content> to <asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server"> – Mohamed Magdy Sep 17 '18 at 9:05
3

The error message is correct that only content tags can be added in those sections.

I have seen issues where the Content tag is all lower case like

<asp:content ....>

when infact it should be uppercase e.g

<asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
  • 1
    Hahaha, how to get answers, check the comments!!! – Arul kumar Sep 17 '18 at 15:07
  • Yes you are right :) – Mohamed Magdy Sep 23 '18 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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