If you would like to discuss anything, please contact me via email: Howard.Bayliss@sequence.co.uk

Friday, February 4, 2011

Content controls have to be top-level controls in a content page

I made a change to a page layout to include a CSS file and started seeing an error message which said "Content controls have to be top-level controls in a content page".

This is how the markup looked; can you see the error?

<asp:Content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">

<ContentTemplate>

<SharePointWebControls:CssRegistration name="/_layouts/1033/styles/Themable/search.css" runat="server" >

</ContentTemplate>
</asp:Content>


Did you spot the error?

The CssRegistration declaration was missing its closing tag. Once fixed, the page worked correctly.

No comments:

Post a Comment