How do you handle query string parameters and catch-all routes in Blazor routing?

Last updated 5 July 2026

  • Bind query strings declaratively with [Parameter, SupplyParameterFromQuery] (use Name to map a different key), or parse NavigationManager.Uri manually with QueryHelpers.ParseQuery.

  • Catch-all routes use a {*param} segment (e.g. @page "/files/{*path}") that captures the whole remaining path, slashes included, into one string.

  • https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/routing?view=aspnetcore-10.0
  • https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/navigation?view=aspnetcore-10.0
  • https://www.telerik.com/blogs/blazor-basics-blazor-routing-navigation-fundamentals
  • https://www.c-sharpcorner.com/article/routing-101-in-blazor/
  • https://jonhilton.net/blazor-deep-linking/
  • https://medium.com/@syeedmdtalha/capturing-query-parameters-in-blazor-with-supplyparameterfromquery-9bb97c457f42
  • https://www.luisllamas.es/blazor-routing-page-directive/
All Blazor interview questions