Dela via


PageConventionCollectionExtensions.AddPageRoute Method

Definition

Adds the specified route to the page at the specified pageName.

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 AddPageRoute (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string pageName, string route);
static member AddPageRoute : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AddPageRoute (conventions As PageConventionCollection, pageName As String, route As String) As PageConventionCollection

Parameters

pageName
String

The page name.

route
String

The route to associate with the page.

Returns

The PageConventionCollection.

Applies to