ViewHierarchyUtility.GetViewImportsLocations(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the locations for _ViewImports
s that are applicable to the specified path.
public:
static System::Collections::Generic::IEnumerable<System::String ^> ^ GetViewImportsLocations(System::String ^ applicationRelativePath);
public static System.Collections.Generic.IEnumerable<string> GetViewImportsLocations (string applicationRelativePath);
static member GetViewImportsLocations : string -> seq<string>
Public Shared Function GetViewImportsLocations (applicationRelativePath As String) As IEnumerable(Of String)
Parameters
- applicationRelativePath
- String
The application relative path of the file to locate
_ViewImports
s for.
Returns
A sequence of paths that represent potential _ViewImports
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/_ViewImports.cshtml, /Views/_ViewImports.cshtml, /_ViewImports.cshtml ]
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for