title: When should Page.Header.DataBind be called?
body: <p>I'm trying to resolve correct paths to javascript scripts in my head section using:</p>
  
  <pre><code>&lt;script src="&lt;%# ResolveUrl("~/Scripts/jquery-1.4.2.min.js") %&gt;" type="text/javascript" /&gt;
  </code></pre>
  
  <p>In order to resolve the path I need to call databind using <code>Page.Header.DataBind();</code>  What event should I place the databind call in?</p>
  
  <p>Thanks.</p>
  
  <p>Reference: <a href="http://leedumond.com/blog/the-controls-collection-cannot-be-modified-because-the-control-contains-code-blocks/" rel="noreferrer">http://leedumond.com/blog/the-controls-collection-cannot-be-modified-because-the-control-contains-code-blocks/</a></p>
  
  <p>When I put it in Page_Load as the article suggests it works (only for firefox), but I wonder if this is the correct place.</p>
  
  <p>When I follow this article IE 8 renders:</p>
  
  <pre><code>&lt;script src="/Scripts/jquery-1.4.2.min.js" type="text/javascript" /&gt;
  </code></pre>
  
  <p>and firefox 3.6 correctly renders:</p>
  
  <pre><code>&lt;script src="../../Scripts/jquery-1.4.2.min.js" type="text/javascript" /&gt;
  </code></pre>
  
  <p>Update:</p>
  
  <p>Fixed browser issues by updating a script reference in a referenced user control to use ResolveUrl.  Now browser issues are fixed.  Still wondering where to put Databind.</p>