title: define javascript in ascx control or on parent page?
body: <p>I am having some issues with javascripts that don't work. My asp.net 3.5 webforms app has a page that contains several user controls (ascx) which contain javascript. Not all of them work What is the best practice to put the javascript in ? in the head section of the parent page or in the user control? also do i always need to define it like this? I dont use any js framework here:</p>
  
  <pre><code>window.onload = function(){ 
  //initialize js scripts
  
  }
  </code></pre>