共用方式為


PageConventionCollection.AddPageRouteModelConvention 方法

定義

建立並新增 , IPageRouteModelConvention 以針對具有指定名稱的頁面叫用 動作 PageRouteModel

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

參數

pageName
String

頁面的名稱,例如 /Users/List

傳回

加入 IPageRouteModelConvention 的 。

適用於