I've got an ASP.NET MVC 4 application with a few sub-Areas. Ideally I'd like each Area to be as self-contained as possible, including all Content, Images, and so forth.
Is it possible to override the behavior of the "~" (tilde) character in resource paths within my Area View scripts to always refer to the Area root instead of the Application root?
Alternatively, is there another generic way to reference the Area root?
Example:
@* Should point to "~/Areas/MyNiftyArea/Images/logo.png": *@
@Url.Content("~/Images/logo.png");
Note: The rationale behind this is that I'm composing a single ASP.NET MVC web application from a few smaller applications, and I want to make sure the apps can be easily broken out again and rearranged as needed, including separating them back into their own applications down the road if necessary, without having to go through and split out all my resource/script files or change a bunch of explicitly-defined paths.
Of course, if there's a much better way to achieve this, I'm open to that as well.