Confused by Use of ~ in ASP.NET
<p>I am programming for the first time in ASP.NET.  It's proven to be very easy and I'm really enjoying it.  One feature I like is that, within a web page, I can reference files from root by using the tilde (~) character and then the rest of the path.  However, this does not seem to be consistent.  For example, it works within the context of href, e.g.</p>

<pre><code>&lt;link href="~/css/StyleSheet.css" /&gt;
</code></pre>

<p>It doesn't work with respect to src, e.g.</p>

<pre><code>&lt;img src="~/images/header.jpg" /&gt;
</code></pre>

<p>Why is this?  Is there something I'm doing wrong.  The inconsistency is annoying.</p>
