RazorViewEngine.GetNormalizedRouteValue(ActionContext, String) 方法

定義

取得指定之路由 key 的正規化路由值。

public:
 static System::String ^ GetNormalizedRouteValue(Microsoft::AspNetCore::Mvc::ActionContext ^ context, System::String ^ key);
public static string GetNormalizedRouteValue (Microsoft.AspNetCore.Mvc.ActionContext context, string key);
public static string? GetNormalizedRouteValue (Microsoft.AspNetCore.Mvc.ActionContext context, string key);
static member GetNormalizedRouteValue : Microsoft.AspNetCore.Mvc.ActionContext * string -> string
Public Shared Function GetNormalizedRouteValue (context As ActionContext, key As String) As String

參數

key
String

要查閱的路由鍵。

傳回

對應至「索引鍵」的值。

備註

中的 RouteData 路由值大小寫是由用戶端決定。 這會讓檢視位置在區分大小寫的檔案系統中建構路徑不可靠。 RouteValues使用 取得路由值會產生一致的案例結果。

適用於