Share via


RazorViewEngineOptions.AreaViewLocationFormats Property

Definition

Gets the locations where RazorViewEngine will search for views within an area.

public:
 property System::Collections::Generic::IList<System::String ^> ^ AreaViewLocationFormats { System::Collections::Generic::IList<System::String ^> ^ get(); };
public System.Collections.Generic.IList<string> AreaViewLocationFormats { get; }
member this.AreaViewLocationFormats : System.Collections.Generic.IList<string>
Public ReadOnly Property AreaViewLocationFormats As IList(Of String)

Property Value

Remarks

The locations of the views returned from controllers that belong to an area. Locations are format strings (see https://msdn.microsoft.com/en-us/library/txafckwd.aspx) which may contain the following format items:

  • {0} - Action Name
  • {1} - Controller Name
  • {2} - Area Name

The values for these locations are case-sensitive on case-sensitive file systems. For example, the view for the Test action of HomeController under Admin area should be located at /Areas/Admin/Views/Home/Test.cshtml. Locations such as /areas/admin/views/home/test.cshtml would not be discovered.

Applies to