title: What is the best way to reference jquery in asp.net?
body: <p>I watched a pdc session by Stephen Walther and in the presentation he was referencing the JQuery js file like the following:</p>
  
  <pre><code>&lt;asp:ScriptManager id="sm1" runat="server"&gt;
  &lt;Scripts&gt;
      &lt;asp:ScriptReference Path="~/Scripts/JQuery.js" /&gt;
  &lt;/Scripts&gt;
  &lt;/asp:ScriptManager&gt;
  </code></pre>
  
  <p>Is there a advantage or disadvantage to doing it the above way instead of just using a link in the head section of the page.</p>
  
  <p>He was also putting the following into the javascript section of his sample pages to run JQuery:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  function pageLoad()
  {
     $(":text").css("background-color","yellow");
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Is the pageLoad necesary above?  He mentioned that it is from the Microsoft AJAX library and it waits for the DOM to be finished loading, but I thought the $ symbol in JQuery is just a shorthand for waiting for the DOM to be finished loading.</p>