Is it possible to determine if a specific view name exists from within a controller before rendering the view?
I have a requirement to dynamically determine the name
Here's how to do it in Razor for Core 2.2 etc. Note that the call is "GetView", not "Find View)
@using Microsoft.AspNetCore.Mvc.ViewEngines @inject ICompositeViewEngine Engine ... @if (Engine.GetView(scriptName, scriptName, isMainPage: false).Success) { @await Html.PartialAsync(scriptName) }