RoutingHttpContextExtensions.GetRouteValue(HttpContext, 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 a route value from Values associated with the provided
httpContext
.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ GetRouteValue(Microsoft::AspNetCore::Http::HttpContext ^ httpContext, System::String ^ key);
public static object GetRouteValue (this Microsoft.AspNetCore.Http.HttpContext httpContext, string key);
public static object? GetRouteValue (this Microsoft.AspNetCore.Http.HttpContext httpContext, string key);
static member GetRouteValue : Microsoft.AspNetCore.Http.HttpContext * string -> obj
<Extension()>
Public Function GetRouteValue (httpContext As HttpContext, key As String) As Object
Parameters
- httpContext
- HttpContext
The HttpContext associated with the current request.
- key
- String
The key of the route value.
Returns
The corresponding route value, or null.