title: ASP.NET relative path
body: <p>I'm confused with ASP.NET relative path, please can someone help?</p>
  
  <p>In a Master Page I gave a link label referencing:</p>
  
  <pre><code>&lt;a href="~/Account/Login.aspx"&gt;Login&lt;/a&gt;
  </code></pre>
  
  <p>From the ASP.NET official documentation I read:</p>
  
  <p>The following example shows the <strong>~ operator used to specify a root-relative path</strong> for an image when using the Image server control In this example, the image file is read from the Images folder that is located directly under the root of the Web application, <strong>regardless of where in the Web site the page is located.</strong></p>
  
  <p><code>&lt;asp:image runat="server" id="Image1"
    ImageUrl="~/Images/SampleImage.jpg" /&gt;</code></p>
  
  <p>With the Login markup, when I click the link from a page in the /Account folder, I'm redirected to:</p>
  
  <pre><code>/Account/~/Account/Login.aspx
  </code></pre>
  
  <p>Why? WHY?h</p>