PageConventionCollection.AddAreaPageRouteModelConvention(String, String, Action<PageRouteModel>) Method

Definition

Creates and adds an IPageRouteModelConvention that invokes an action on the PageRouteModel for the page with the specified name located in the specified area.

public:
 Microsoft::AspNetCore::Mvc::ApplicationModels::IPageRouteModelConvention ^ AddAreaPageRouteModelConvention(System::String ^ areaName, System::String ^ pageName, Action<Microsoft::AspNetCore::Mvc::ApplicationModels::PageRouteModel ^> ^ action);
public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention AddAreaPageRouteModelConvention (string areaName, string pageName, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> action);
member this.AddAreaPageRouteModelConvention : string * string * Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageRouteModel> -> Microsoft.AspNetCore.Mvc.ApplicationModels.IPageRouteModelConvention
Public Function AddAreaPageRouteModelConvention (areaName As String, pageName As String, action As Action(Of PageRouteModel)) As IPageRouteModelConvention

Parameters

areaName
String

The area name.

pageName
String

The page name e.g. /Users/List

The page name is the path of the file without extension, relative to the pages root directory for the specified area. e.g. the page name for the file Areas/Identity/Pages/Manage/Accounts.cshtml, is /Manage/Accounts.

Returns

Applies to