Url generation
URL generation is the programmatic construction of resource or endpoint URLs from routing metadata and parameter values.
ASP.NET Core in Action, 3e
URL generation is the process of constructing endpoint URLs from routing metadata and route parameter values.
- How it is used
- Decouples endpoint links and redirects from hardcoded paths while generating URLs dynamically.
- How deep it goes
- Explains reverse routing, route values, LinkGenerator, IUrlHelper, and query-string fallback, but not generator internals.
- Examples
- Uses renamed cart and basket paths, product/view/3, and a Currency/View page with the USD route value.
- What you can do after
- Apply it via LinkGenerator or IUrlHelper to create links and response redirects that follow route changes.
Read how ASP.NET Core in Action, 3e explains url generation →
Pro ASP.NET Core 7, Tenth Edition
URL generation is the programmatic construction of resource or endpoint URLs from application configuration and routing information.
- How it is used
- Generates view links and endpoint redirects from routing configuration instead of hard-coded URL strings.
- How deep it goes
- Demonstrates tag-helper markup, route naming, dependency-injected LinkGenerator calls, and route-pattern changes.
- Examples
- Uses an RSVP action link, named population and capital endpoints, Monaco route values, and a changed population URL pattern.
- What you can do after
- Apply it via asp-action and LinkGenerator to create links that continue working when route patterns change.
Read how Pro ASP.NET Core 7, Tenth Edition explains url generation →
What to know first
- controllerA controller is a software component that receives input or requests and coordinates other components or operations to produce a response or change application state.
- Razor PagesRazor Pages is an ASP.NET Core page-focused programming model in which independently addressable pages combine Razor markup with request-handling logic.
- routingRouting is the process of directing an item, request, or task to a destination or processing path according to relevant rules or characteristics.
- uriA URI (Uniform Resource Identifier) is a standardized sequence of characters that identifies an abstract or physical resource.
Related concepts
- LinkGeneratorused by · LinkGenerator is an ASP.NET Core service that generates URL paths and URLs from endpoint routing information.
- routingused by · Routing is the process of directing an item, request, or task to a destination or processing path according to relevant rules or characteristics.
- form tag helperused by · The Form Tag Helper is an ASP.NET Core Tag Helper that processes Razor form elements and generates form-related HTML attributes and antiforgery content.
- route dataused by · Route data is a collection of named information associated with a route and made available for request handling, navigation, rendering, or URL generation.
- anchor tag helperused by · The Anchor Tag Helper is an ASP.NET Core component that generates anchor URLs from routing and Razor Page attributes.
Questions about url generation
What is url generation?
URL generation is the programmatic construction of resource or endpoint URLs from routing metadata and parameter values.
Which Manning books explain url generation?
ASP.NET Core in Action, 3e and Pro ASP.NET Core 7, Tenth Edition.
What should I know before learning url generation?
Manning books that teach url generation usually introduce controller, Razor Pages, routing and uri first.
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.

