Typically, new developers to ASP.Net MVC get stumped with having to deal with one important fact:
Page.ResolveUrl(...); is missing!!!
Don’t worry or fret – the new way of doing this is:
Some sample usage is as below:
<img src="<%= Url.Content("~/content/images/myImage.gif") %>" alt="My image" title="My image" />
Simple as that.
When you refer stylesheet files in your *.Master page, this link is directly reference without needing to use the Url helper as shown above.
So, you can continue refering stylesheet files like:
<link rel="stylesheet" type="text\css" media="screen" href="../content/site.css" />
The MVC framework will resolve the path correctly at run-time.