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()

3
  • 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
    Commented Sep 17, 2018 at 7:51
  • 1
    If you share the markup for the page layout we will be able to help better. Commented Sep 17, 2018 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"> Commented Sep 17, 2018 at 9:05

1 Answer 1

4

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">
2
  • 1
    Hahaha, how to get answers, check the comments!!!
    – Arul kumar
    Commented Sep 17, 2018 at 15:07
  • Yes you are right :) Commented Sep 23, 2018 at 10:30

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.