Route data
Route data is a collection of named information associated with a route and made available for request handling, navigation, rendering, or URL generation.
ASP.NET Core in Action, 3e
Route data is a collection of named values supplied to an endpoint route during URL generation.
- How it is used
- Uses named route values to generate URLs and carry values extracted from incoming requests to endpoints.
- How deep it goes
- Explains route-value extraction, defaults, constraints, and named-link generation with worked examples; defers detailed model binding.
- Examples
- Uses a named product endpoint, a defaulted product route, and a Razor Pages search handler to illustrate route values.
- What you can do after
- Apply it via LinkGenerator to generate a path for a named endpoint using route data.
Pro ASP.NET Core 7, Tenth Edition
RouteData is the ASP.NET Core request-context data containing values produced by routing for the matched URL, including values captured from URL segments.
- How it is used
- Uses route values to adapt view-component output and supply action arguments through model binding.
- How deep it goes
- Demonstrates named-value access, a component unit test, and binding precedence without detailing routing internals.
- Examples
- Shows category-link highlighting, a route-data unit test, conditional controller-request output, and competing URL id values.
- What you can do after
- Apply it via ASP.NET Core RouteData.Values to tailor a view component or predict which id value an action receives.
Read how Pro ASP.NET Core 7, Tenth Edition explains route data →
Also covered in
What to know first
- HTTP requestAn HTTP request is a message sent by a client to a server using the Hypertext Transfer Protocol, specifying a method and target and optionally including headers and a body.
Related concepts
- route parameterproduced by · A route parameter is a named variable embedded in a URL path whose value is captured from a matching request to identify or select a resource or operation.
- datakind of · Data is recorded or represented information, observations, measurements, or values that can be stored, processed, communicated, or interpreted.
- model bindingused by · Model binding is the process of locating incoming data, converting it to appropriate types, and assigning it to application objects or handler parameters.
- form datacontrasts with · Form data is a collection of named values associated with form controls for submission or processing.
- view componentused by · A view component is a reusable user-interface unit that encapsulates presentation logic for rendering a portion of a page or response.
Questions about route data
What is route data?
Route data is a collection of named information associated with a route and made available for request handling, navigation, rendering, or URL generation.
Which Manning books explain route data?
ASP.NET Core in Action, 3e and Pro ASP.NET Core 7, Tenth Edition.
What should I know before learning route data?
Manning books that teach route data usually introduce HTTP request first.
What is the difference between route data and form data?
Route data is a collection of named information associated with a route and made available for request handling, navigation, rendering, or URL generation. Form data is a collection of named values associated with form controls for submission or processing.
What is route data a kind of?
Route data is a kind of data. Data is recorded or represented information, observations, measurements, or values that can be stored, processed, communicated, or interpreted.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

