Attempt 1: Use a fixed path. (Partial Success)
While this "works" it isn't exactly the most resilient to server changes - what if we move to/from a single/multi application server? We need to re-write all our URL's
Attempt 2: Use Application Root Reference (~) (Fail)
This just plain doesn't work because script tags do not get parsed by ASP page renderer so the URL doesn't get converted and what you see here is what you end up with on the page which obviously isn't correct.
Attempt 3: Use Server Code (<%= %>) (Partial Success/Fail)
Again this is going to fail in certain situations (but not all). This will fail when your head tag has a runat="server" attribute present. In some cases you can simply remove the attribute but if you are using the "out-of-the-box" CSS Themes/Skins you NEED this.
Attempt 4: Use a Second <HEAD> Element (Partial Success)
This will work as you would expect - the only problem is that it isn't valid Markup and will fail if you throw it through W3C Validators.
Attempt 5: Add script tags "Outside" Head Element (Partial Success)
Again this will work the only problem is you can never guarantee another developer won't stick code (which is dependant on your global script) BEFORE your inclusion of said script which is a bit of a <head>ache (i.e. in the <head> element - get it?).
Attempt 6: Insert Script Tags via MasterPage Page_Load Event (Success)
I suppose this is the first real successful attempt. It does what it says by dynamically creating new Script tag element and inserting them to the top of <head>. I inserted everything at the top of the head so no matter where people put their scripts it's going to have all global resources available. The only problem with this is that EVERY Page_Load event is going to dynamically inject new Elements into the head and it's not exactly a very clean separation of mark-up and code.
Attempt 7/Solution 1: Use Data Binding to Evaluate src Attribute (AKA The Holmes Technique)
Jonny Holmes uncovered a more elegant solution to this issue and it is described above. It gets around the issue of not being able to use <%= %> tags by using a Data Binding Expression. And all you have to do is perform a DataBind() during the Page_Load event and you're sorted like Ebenezer.
Anyone got any other methods to do this?