ViewHierarchyUtility.GetViewStartLocations(String) Method

Definition

Gets the view start locations that are applicable to the specified path.

C#
public static System.Collections.Generic.IEnumerable<string> GetViewStartLocations (string applicationRelativePath);

Parameters

applicationRelativePath
String

The application relative path of the file to locate _ViewStarts for.

Returns

A sequence of paths that represent potential view start locations.

Remarks

This method returns paths starting from the directory of applicationRelativePath and moves upwards until it hits the application root. e.g. /Views/Home/View.cshtml -> [ /Views/Home/_ViewStart.cshtml, /Views/_ViewStart.cshtml, /_ViewStart.cshtml ]

Applies to

Product Versions
ASP.NET Core 1.0, 1.1