RazorViewEngine.GetNormalizedRouteValue(ActionContext, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- context
- ActionContext
The ActionContext.
- 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.