I have an ASP.NET MVC project and I want to put CSHTML files outside of Views Folder. While I can do so easily by adding the CSHTML files in my desired folder, I am not able to render partial view result from these files.
The folder structure I currently have is roughly as follows: Root | |--Templates | |---Welcome.cshtml | |--Views | |---
I'm using the below syntax from one of the controller actions
public ActionResult Welcome()
{
return PartialView("Welcome");
}
However, doing so, razor is not able to locate the Welcome.cshtml. I have read about using a custom view engine to change the default search location etc. etc. but wondering if this just can be solved by addition configuration.