Why does my localhost image url change
<p>I have a bunch of images in my localhost folder (C:\inetpub\wwwroot\Images) which I am trying to access within my ASP.net application. The image src generated in my markup is:</p>

<pre><code>&lt;img id="MainContent_MainImage" src="localhost/Images/FGOStuart_7166.jpg" /&gt;`
</code></pre>

<p>This fails to load the image and if I look at the source for the page it actually directs to</p>

<p><code>http://localhost:64395/Pages/localhost/Images/FGOStuart_7166.jpg</code></p>

<p>so it looks like it is trying to access a path relative to the page (on the Pages folder). The src works if I type it into the browser manually and the image is displayed.</p>

<p>Can anyone explain what's going on here and how to fix it? I'm attempting to move the images out of the database and onto the file system but without much luck so far.</p>
