When enhancing MOSS publising pages using jQuery, I hit the following speed bump:
Server Error in ‘/’ Application.
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls.
Source File: /_catalogs/masterpage/KCC_FacultyMember.aspx Line: 12
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
It was easy enough to fix (h/t to my colleague, Uday Ethirajulu). Be sure that the jQuery code lives inside the “PlaceHolderAdditionalPageHead” as shown:
<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
// Brilliant jQuery stuff goes here.
Follow me on Twitter at http://www.twitter.com/pagalvin
I usually put my jQuery inside the [sourcecode language=”xml”][/sourcecode], but either works.