title: how to render the relative path with tilde into ../../ of relative path in jquery/javascript?
body: <p>Well, i understand my title is a bit confusing. I will state it clearly below with the example.</p>
  
  <pre><code>&lt;asp:ImageButton ID="imgButton" NavigateUrl="~/Presentation/Resources/Images/addFile.png" runat="server" /&gt;
  </code></pre>
  
  <p>In html, the control above will be rendered as </p>
  
  <pre><code>&lt;input type="image" name="imgButton" id="imgButton" src="../../Resources/Images/addFile.png" style="border-width:0px;"&gt;
  </code></pre>
  
  <p>I notice that,it will convert the src from "~" to "../../" .It auto arrange it will the file level.</p>
  
  <p>so in javascript, i want to set it the control with this url : </p>
  
  <blockquote>
    <p>~/Presentation/Resources/Images/PDF.png</p>
  </blockquote>
  
  <p>unfortunately, in html it will be rendered as  </p>
  
  <pre><code>&lt;input type="image" name="imgButton" id="imgButton" src="~/Presentation/Resources/Images/addFile.png" style="border-width:0px;"&gt;
  </code></pre>
  
  <p><strong>My question is, What should i write if i wanna get the "../../" relative path with "~" ?</strong>
  I have tried this,but i cant get it.</p>
  
  <pre><code>&lt;script type="javascript"&gt;
  document.getElementById("&lt;%= imgButton.ClientID %&gt;").src = 
  "~/Presentation/Resources/Images/PDF.png";
  &lt;/script&gt;
  </code></pre>