In my razor style helper class (located in the App_Code folder, I've got this line of code:
<img src="../../Content/images/ajax_activity.gif" alt="loading"/>
<img src="@Href("~/Content/images/ajax_activity.gif")" alt="loading" />
OK, solved it, though I'm not really sure why it's working. After trying all the following combinations without success:
<img src="../Content/images/ajax_activity.gif" alt="loading"/>
<img src="/Content/images/ajax_activity.gif" alt="loading"/>
<img src="~/Content/images/ajax_activity.gif" alt="loading"/>
<img src="Content/images/ajax_activity.gif" alt="loading"/>
the following finally worked as expected
<img src="./Content/images/ajax_activity.gif" alt="loading"/>
It returned the image path correctly with the virtual directory set. Anyone able to explain this?