joee wrote:I tried adding an asp:contentHolder tag inbetween the opening and closing <head> tags, but that doesn't seem to work
An <asp:ContentPlaceHolder> is for, well, "content"
There's at least two ways to include the js file from the content page
1) Use the ClientScript.RegisterScriptBlock class to do it, one "problem" with this is that it'll add the <script> tag somewhere inside the <body> tags.... i always read that inside the <head> tag is the best place for the script tags, so you could alternatively do:
2) Create a new "HtmlGenericControl" with TagName of "script" and add the necessary attributes of "src" and "type",
Dim si As New HtmlGenericControl
si.TagNane = "script"
si.Attributes.Add("type", "javascript")
si.Attributes.Add("src", "/includes/somescript.js")
and then using the fact that your aspx page using your master page has a built in "hook" to the <head> tag in the master page, and its simply accessed it by saying: "Header", you'd say:
Header.Controls.Add(si)
and now your <script> reference should be inside the <head> tags