title: add JavaScripts files to the body dynamically instead of to the head
body: <p>I have done enough research and have decided to move the JavaScript to the bottom of the page. 
  Here is why i should do it <a href="http://developer.yahoo.com/performance/rules.html#js_bottom" rel="nofollow">http://developer.yahoo.com/performance/rules.html#js_bottom</a> </p>
  
  <p>I wrote the code below, this code only can add the JavaScript within the header.
  How do I add the JavaScript before the &lt;/body&gt; of the page? I am thinking about using 
  
  <p>The code below will adding the JavaScript to the header not the body.</p>
  
  <pre><code> public static string AddJavascript(string filename, Page ThisPage)
          {
              HtmlGenericControl js = new HtmlGenericControl("script");
              js.Attributes["type"] = "text/javascript";
              js.Attributes["src"] = filename;
              ThisPage.Header.Controls.Add(js);
              //Add to bottom of the page.
              return null;
          }
  
          protected void Page_Load(object sender, EventArgs e)
          {
              AddJavascript("myjd.js", Page);
          }
  </code></pre>
  
  <p>I like to produce something like below this dynamically. I have several JavaScript files so i really like to keep them separate.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html;charset=utf-8" /&gt;
  &lt;title&gt;
  &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;
      my content here
      &lt;/div&gt;
      &lt;!---javascript should go below here--&gt;
  &lt;script type="text/javascript" src="myjd.js"&gt;
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>