To be able to access the JavaScript in the embedded resource, you need to take two steps: Declare the resource in the control's class file or in the AssemblyInfo.cs using the syntax:
[assembly: WebResource("ControlLibrary.script.js", "text/javascript")]Now we can access the file through the WebResource.axd HTTP handler, then we may retrieve the actual file from the resources of the project's assembly by calling the method GetWebResourceUrl(type, webresource).
protected override void OnPreRender(EventArgs e){ base.OnPreRender(e); this.Page.ClientScript.RegisterClientScriptInclude("NameForScript", this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "ControlLibrary.Script.js"));}