Specialised Training | SharePoint | Microsoft 365 | Nintex | LiveTiles | Azure | Project Server
There are many way to achieve this, and one that is most obvious to developers is modifying the master pages or page layouts. This would work perfectly fine, but a ‘cleaner’ (and Microsoft recommended) way would be to use Delegate Controls.
To inject mark-up into the Delegate Control, three things are required:
For example:
When the feature is activated, the content of UserControl.ascx would be injected into the Delegate Control. This means a jQuery reference, or JavaScript for Google Analytics can be added without modifying and redeploying the masterpage/page layout. An added bonus is that the mark-up can be injected/removed by activating/deactivating the feature.
Posted by Alan Shum