Q:

Adding "~" to the href for a html link

I have the following link inside my asp.net mvc razor view:-
<a class="brand" href="~/Home/Index/"> <img alt="test" src="~/Content/logo.png" /> </a>

But i am not sure what does the symbol ~ inside the src & href do ? as removing this symbol will still reference to the correct imag and the correct url ? can anyone advice please ?
Thanks

A:

http://msdn.microsoft.com/en-us/library/ms178116(v=vs.100).aspx
~ means root directory of your application.
Following SO post may help to know more.
slash(/) vs tilde slash (~/) in style sheet path in asp.net
In your case removing the ~ from path will make your path absolute. Then the url will become http://example.com/absoulte/path. If your project root directory and web root is same, it will make no difference. You may also want to visit these links. 
http://www.boogiejack.com/server_paths.html
Absolute path & Relative Path

