This can be easily accomplished by creating a custom RazorViewEngine implementation and adding custom mappings to ViewLocationFormats. It's important to remember adding custom mappings to the top of the ViewLocationFormats array, as they are more specific than existing mappings.
namespace MobileViewsInMobileFolder.Utility { public class MyCustomViewEngine : RazorViewEngine { public MyCustomViewEngine() { List<string> existingViewLocationFormats = ViewLocationFormats.ToList();
And then be sure to add a custom view engine to Application_Start
ViewEngines.Engines.Clear(); ViewEngines.Engines.Add(new MyCustomViewEngine());
source share