PageRouteModel 類別

定義

路由 RazorPages 的模型元件。

public ref class PageRouteModel
public class PageRouteModel
type PageRouteModel = class
Public Class PageRouteModel
繼承
PageRouteModel

建構函式

PageRouteModel(PageRouteModel)

PageRouteModel 複製建構函式。

PageRouteModel(String, String)

初始化 PageRouteModel 的新執行個體。

PageRouteModel(String, String, String)

初始化 PageRouteModel 的新執行個體。

屬性

AreaName

取得區功能變數名稱稱。 將會 null 用於非區域頁面。

Properties

儲存與 相關聯的 PageRouteModel 任意中繼資料屬性。

RelativePath

取得頁面的應用程式根相對路徑。

RouteParameterTransformer

取得或設定 , IOutboundParameterTransformer 這個參數將用來將內建路由參數,例如 actioncontroller 和 , area 以及指定的 RouteValues 其他參數轉換成路由範本中的靜態區段。

RouteValues

取得路由值的集合,這些值必須存在於 中 Values ,才能選取對應的頁面。

Selectors

SelectorModel取得 實例。

ViewEnginePath

取得相對於頁面探索基底路徑的路徑。

這個值是沒有副檔名的檔案路徑,相對於頁面根目錄。 例如 ViewEnginePath ,檔案 /Pages/Catalog/Reservations.cshtml 的 是 /Catalog/Antiques

在區域中,此值是沒有副檔名的檔案路徑,相對於指定區域的分頁根目錄。 例如 ViewEnginePath ,區域/身分識別/頁面/管理/Accounts.cshtml 檔案的 是 /Manage/Accounts

適用於