page.resolveclientUrl The Controls collection cannot be modified because the control contains code blocks.
If you use masterpage and then you want your js to be relative to the URL path you could use the <%= Page.ResolveClientUrl("~/js/myjs.js") %>
the problem is if you use head runat="server"
it will throws error The Controls collection cannot be modified because the control contains code blocks "<%= ... >"
The solution for this is not to use the runtime '=' but to replace it with the binding '#'
then on the page load use the [YourHeadID].Databind();