samedi 31 janvier 2015

Referencing JS and CSS in sandbox web parts error

I am trying to reference JS and CSS files in sandbox web part, but once I try to deploy it gives me this error:



The expression prefix 'SPUrl' was not recognized. Please correct the prefix or register the prefix in the section of configuration.



I am referencing my css and js this way:



<SharePoint:ScriptLink Name="<% $SPUrl:~sitecollection/style library/assets/js/modernizr.js %>" ID="modernizr" runat="server" ></SharePoint:ScriptLink>
<SharePoint:CssRegistration ID="CssRegistration1" Name="<% $SPUrl:~sitecollection/style library/assets/css/style.css %>" runat="server" After="corev15.css" ></SharePoint:CssRegistration>


Anything wrong with that? Is there a limitation for this in Sandbox solutions?


Aucun commentaire:

Enregistrer un commentaire