RazorViewEngine.GetNormalizedRouteValue(ActionContext, String) Method

Definition

Gets the case-normalized route value for the specified route 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

Parameters

key
String

The route key to lookup.

Returns

The value corresponding to the key.

Remarks

The casing of a route value in RouteData is determined by the client. This making constructing paths for view locations in a case sensitive file system unreliable. Using the RouteValues to get route values produces consistently cased results.

Applies to