Skip to content

Conversation

@guardrex
Copy link
Collaborator

@guardrex guardrex commented Sep 23, 2025

Fixes #35683
Fixes #36190

Splits roughly along Router component and NavLink/NavigationManager lines.

Not Found spans them, so there's a little bit on the NotFoundPage param in the Routing article with the rest in the Not Found responses section of the new Navigation article.

I'm not planning a review/update of all sections at this time. It would slow me down by a couple of days in reaching the next Blazorfy IT!™ issue, but let me know if you would like to go for a full review on all of this guidance.

I'm inlining code examples because it's taking an awful lot of time ... i.e., 💰💰💰 ... to update sample cross-links every release for no great benefit. The code isn't changing and isn't likely to change for these examples. I'm stripping off the <PageTitle> markup because it came in at 6.0, making the examples apply universally.

Outlines

Routing article

  • Introductory remarks
  • Static versus interactive routing
  • ASP.NET Core endpoint routing integration
  • Route templates
  • Focus an element on navigation
  • Provide custom content when content isn't found
  • Route to components from multiple assemblies
    • Static routing
    • Interactive routing
  • Route parameters
  • Route constraints
  • Avoid file capture in a route parameter
  • Routing with URLs that contain dots
  • Handle asynchronous navigation events with OnNavigateAsync
  • Handle cancellations in OnNavigateAsync
  • User interaction with <Navigating> content

Navigation article

  • Introductory remarks
  • NavLink component
  • URI and navigation state helpers
  • Location changes
  • Navigation Manager redirect behavior during static server-side rendering (static SSR)
  • Not Found responses
  • Enhanced navigation and form handling
  • Produce a URI relative to the base URI prefix
  • Navigation history state
  • Navigation options
  • Query strings
    • Replace a query parameter value when the parameter exists
    • Append a query parameter and value when the parameter doesn't exist
    • Remove a query parameter when the parameter value is null
    • Add, update, and remove query parameters
    • Support for enumerable values
    • Navigate with an added or modified query string
  • Hashed routing to named elements
  • Handle/prevent location changes
  • Dynamically-generated NavLink components via reflection

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
aspnetcore/blazor/call-web-api.md aspnetcore/blazor/call-web-api
aspnetcore/blazor/components/built-in-components.md aspnetcore/blazor/components/built-in-components
aspnetcore/blazor/components/index.md aspnetcore/blazor/components/index
aspnetcore/blazor/components/render-modes.md aspnetcore/blazor/components/render-modes
aspnetcore/blazor/components/rendering.md aspnetcore/blazor/components/rendering
aspnetcore/blazor/forms/index.md aspnetcore/blazor/forms/index
aspnetcore/blazor/fundamentals/dependency-injection.md aspnetcore/blazor/fundamentals/dependency-injection
aspnetcore/blazor/fundamentals/navigation.md aspnetcore/blazor/fundamentals/navigation
aspnetcore/blazor/fundamentals/routing.md aspnetcore/blazor/fundamentals/routing
aspnetcore/blazor/fundamentals/startup.md aspnetcore/blazor/fundamentals/startup
aspnetcore/blazor/fundamentals/static-files.md aspnetcore/blazor/fundamentals/static-files
aspnetcore/blazor/host-and-deploy/app-base-path.md aspnetcore/blazor/host-and-deploy/app-base-path
aspnetcore/blazor/javascript-interoperability/location-of-javascript.md aspnetcore/blazor/javascript-interoperability/location-of-javascript
aspnetcore/blazor/javascript-interoperability/static-server-rendering.md aspnetcore/blazor/javascript-interoperability/static-server-rendering
aspnetcore/blazor/project-structure.md aspnetcore/blazor/project-structure
aspnetcore/blazor/security/index.md aspnetcore/blazor/security/index
aspnetcore/blazor/security/webassembly/index.md aspnetcore/blazor/security/webassembly/index
aspnetcore/blazor/state-management/prerendered-state-persistence.md aspnetcore/blazor/state-management/prerendered-state-persistence
aspnetcore/blazor/state-management/server.md aspnetcore/blazor/state-management/server
aspnetcore/blazor/tutorials/movie-database-app/part-3.md aspnetcore/blazor/tutorials/movie-database-app/part-3
aspnetcore/fundamentals/index.md aspnetcore/fundamentals/index
aspnetcore/fundamentals/routing.md aspnetcore/fundamentals/routing
aspnetcore/migration/60-to-70.md aspnetcore/migration/60-to-70
aspnetcore/release-notes/aspnetcore-6.0.md aspnetcore/release-notes/aspnetcore-6.0
aspnetcore/release-notes/aspnetcore-8.0.md aspnetcore/release-notes/aspnetcore-8.0
aspnetcore/security/authentication/passkeys/blazor.md aspnetcore/security/authentication/passkeys/blazor
aspnetcore/toc.yml aspnetcore/toc

@guardrex guardrex self-assigned this Sep 23, 2025
@guardrex guardrex requested a review from danroth27 September 23, 2025 14:28
Copy link
Member

@danroth27 danroth27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall structure of the new routing and navigation articles looks reasonable and I like the addition of the introductory sections. I made a just a few comments on some content issues I spotted. I do think we need to do a more detailed review of some of the sections in these articles. For example, I think the "Static versus interactive routing" section in the Routing article needs some clarification and I'd like the relationship to endpoint routing to be clearer in the following section. But let's move forward with getting this content refactoring in.

@guardrex
Copy link
Collaborator Author

guardrex commented Dec 9, 2025

@danroth27 ... Made the updates. See the last two commits for the changes (your accepted GH suggestions, then my branch changes on your other suggestions).

See if "fragment routing" language/API works better for that example than "hashed routing."

WRT ...

I do think we need to do a more detailed review of some of the sections in these articles. For example, I think the "Static versus interactive routing" section in the Routing article needs some clarification and I'd like the relationship to endpoint routing to be clearer in the following section.

I'll open a follow-up issue. There wasn't a lot of time with the .NET 10 release and non-.NET 10 demands recently, including the Configuration and Logging overhaul PRs. I'm still fighting through issues just to get back to the batch of Blazorfy IT!™ issues that you opened, which are much-needed full article overhauls. I'm trying to make the main doc set's Fundamentals articles agnostic WRT UI stack as much as possible so that they're "Blazorfied" in the sense that they apply (and the examples work) across UI stacks. I'll circle around eventually to the new issue that I'm about to open, but I think your priority is still to get back into these overhaul/updates ASAP, and I'm working in that direction now 🏃‍♂️😅. I might be able to get one more done by 🎄🎅 time.

@wadepickett, do you want to review? The main doc set article maps to your care at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing "preceding example" for NavLinkMatch explanation Consider splitting the Blazor *Routing and Navigation* fundamentals article

3 participants