Add view location

Posted by Joe Enos on August 18, 2021 · 1 min read

 In ASP.NET Core MVC, here’s how to add a new default location to find views:

services.AddControllersWithViews().AddRazorOptions(options => 
options.ViewLocationFormats.Add("/Views/SpecialPlace/{0}.cshtml"))