The HeadHtml Webpart uses this single line of code to add content to the HEAD section of the page.
Page.Header.Controls.Add(new LiteralControl(HTMLCode))
So if your custom master page template is not inheriting the proper namespace (should be PortalPage
) properly and does not have the proper server tags on them (runat="server"
there is a good chance your webparts and everything else might not work.
Take a look at the documentation for creating custom aspx master pages. If you're not using custom aspx templates then you or someone else have modified code where you shouldn't have and this will cause problems all over as this webpart is one of the simplest webparts included with Kentico.