If I use the ~ in an image path, it doesn't work:
<img src="~/Images/SomeImage.jpg">
results in this in the source of the page viewed from the browser:
http://localhost:90/WebSite/Products/~/Images/CenterTopCenter.jpg
when I right click on the image that isn't displaying correctly.
Basically because I have a single master page, and all of my other pages will be in different directories (i.e. Products, or KB or whatever) the pathing changes, so I cant' use relative pathing in the master page. I have to use absolute pathing. The problem is that in development mode I cna't make the development server start up with my project in the root of the development web server, so I can't use absolute pathing because it will be all wrong when I move it to a real IIS server.
This is a major problem with Master Pages because the pathing changes constantly.
Does anyone have a work around?
I either need to work around the pathing to make it absolute to the root of the project, not the web server, or I need to be able to get the development web server that Vs.net 2005 starts to load my project in the root of it. Either would be greatly appreciated :)
Thanks!