Best way to add a control to a page without using the MasterPage or a web part?
-
10-12-2019 - |
Question
We are in the process of figuring out what needs to be done to move our application to SharePoint 2013. We have always used a custom master page with our application that hosts custom styles and a few controls. We are trying to figure out if we really need that custom master page. So far, we have found better ways to do most of the things that we used to rely on our master page to do, but we have a user control that is essential to our application that we need to appear on all of our pages. I haven't found a good way to add this control to our pages without a master page. We don't want it to be a web part.
Does anyone know how to add a custom control to a page in SharePoint?
Solution
You use the AdditionalPageHead delegate control. I blogged about it here: http://www.sharepointjohn.com/sharepoint-2010-programmatically-add-javascript-meta-tags-and-css-styles-to-the-header-of-every-page/