To register an external js file on the page from asp.net code behind, write following code
this.Page.ClientScript.RegisterClientScriptInclude("key", "/Scripts/MyJsFile.js");
Where the first parameter is the key (can be any string) and the second parameter is the path of the .js file name.