PageConventionCollectionExtensions.AddAreaPageRoute Method

Definition

Adds the specified route to the page at the specified pageName located in the specified area.

The page can be routed via route in addition to the default set of path based routes. All links generated for this page will use the specified route.

public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AddAreaPageRoute (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName, string route);
static member AddAreaPageRoute : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AddAreaPageRoute (conventions As PageConventionCollection, areaName As String, pageName As String, route As String) As PageConventionCollection

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.

route
String

The route to associate with the page.

Returns

The PageConventionCollection.

Applies to