Dela via


ViewHierarchyUtility.GetViewStartLocations(String) Method

Definition

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

public:
 static System::Collections::Generic::IEnumerable<System::String ^> ^ GetViewStartLocations(System::String ^ applicationRelativePath);
public static System.Collections.Generic.IEnumerable<string> GetViewStartLocations (string applicationRelativePath);
static member GetViewStartLocations : string -> seq<string>
Public Shared Function GetViewStartLocations (applicationRelativePath As String) As IEnumerable(Of String)

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