How to make script paths inside user control independent of page hierarchy
<p>My website is organized in the following folder structure</p>

<pre><code>Root
  Pages
    CustomerManagement
      DepartMentManagement
  Script
  UserControls
</code></pre>

<p>Now i have a user control inside userControl Folder. I have to use a external js file. So i use it this way</p>

<pre><code>&lt;script type="text/javascript" language="javascript" src="../Script/slider.js"&gt;&lt;/script&gt;
</code></pre>

<p>My understanding is that since both are under root so i have used a single ..
Now what happens is that when this usercontrol is used inside DepartMentManagement it checks for script folder inside CustomerManagement as .. refers to one hierarchy above and script file is not found.Even using a ~ doesnot work.</p>

<p>I want to make this script path independent of the path where this control is used. I don't want to move script reference code to the page as control requires script mot page.Please tell me how to achieve this.</p>
