Maybe too late, but the approach below has the advantage, that the same script is never added twice.
public static void RegisterClientScriptInclude(Page page, string name, string url)
{
Type cstype = page.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = page.ClientScript;
// Check to see if the include script exists already.
if (!cs.IsClientScriptIncludeRegistered(cstype, name))
{
cs.RegisterClientScriptInclude(cstype, name, page.ResolveClientUrl(url));
}
}
Come in handy, if you add external javascript files from different user controls on a need basis.