Tutorial by Examples

To be able to change the view location, you need to implement the IViewLocationExpander. The ExpandViewLocations method returns an IEnumerable<string> containing the different locations where to search, with public class MyViewLocationExpander : IViewLocationExpander { public IEnumerabl...
You now need to register the Expander, in order for it to be used by the Razor View Engine. Just add this in the ConfigureServices of your Startup class. public void ConfigureServices(IServiceCollection services) { services.Configure<RazorViewEngineOptions>(options => { opti...

Page 1 of 1