I customized my ribbon with customactions. These commands of the customactions call some cool Javascript functions from a file (ex. script.js). I include this file with:


Now this file is loaded on every page, and not just on the list-definition I want it to be (RegistrationId="1234"). I can't define a registrationId because the location is ScriptLink.

Is there an easier (and nicer) way than to do it over the Client object model to find out if I'm in the right definiton?

1 Answer 1


An alternative to using a CustomAction with the ScriptLink location would be to use a delegate control with the control id of AdditionalPageHead. That way your server side code in your control could determine the context and output the javascript appropriately.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.