PageConventionCollection.AddAreaPageApplicationModelConvention Method

Definition

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

C#
public Microsoft.AspNetCore.Mvc.ApplicationModels.IPageApplicationModelConvention AddAreaPageApplicationModelConvention (string areaName, string pageName, Action<Microsoft.AspNetCore.Mvc.ApplicationModels.PageApplicationModel> action);

Parameters

areaName
String

The name of area.

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

The added IPageApplicationModelConvention.

Applies to

Product Versions
ASP.NET Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0