Registering a piece of script across all the SharePoint Pages

Posted by NLV on Stack Overflow See other posts from Stack Overflow or by NLV
Published on 2010-05-03T15:47:41Z Indexed on 2010/05/03 16:08 UTC
Read the original article Hit count: 180

Hello all

I've a business requirement in which i need to create a SharePoint feature which registers a JavaScript across all the SharePoint pages.

The only way i figured out to achieve it is that adding the script in (all) the SharePoint Master Pages or any other custom master pages present in the Site/Site Collection/Web Application while activating the feature.

But i found that editing the master pages to add a Javascript snippet is not feasible.

Finally i found that i could register my custom controls in the "Delegate Controls" and the custom user control i created can in turn register my script in the page.

But my question is how can i handle it if the master page does not have a delegate control?

Or is there any other possible solution to register a script across all the SharePoint pages?

© Stack Overflow or respective owner

Related posts about sharepoint

Related posts about moss-2007