Questions tagged [blazor-routing]

4 questions
1
vote
1 answer

Blazor WASM Update Navigation when Collection Changes

My planned design is to have a home page with 4 buttons. When a user clicks any of these buttons it adds an item to the navigation. I used this singleton to manage state public class StateManager { public event Action NewPlanAdded; public…
Adam
  • 1,613
  • 1
  • 16
  • 24
1
vote
2 answers

How to get component type from location/url/route

Scenario: I have a Blazor Server Side app with basic routing and after navigation I need to check whether current page implements particular interface. e.g.: NavigationService.LocationChanged += (sender, args) => { Type componentType =…
Liero
  • 19,054
  • 16
  • 100
  • 195
0
votes
1 answer

Unable to redirect to error page in blazor server as it is returning 200 status code to the page that does not exists

In Blazor, we can directly assign the route to each page on the razor itself. (that's the fun part doing) but I want to navigate to "/error" or "/404" page when any non-existing url is entered. Please Help me how we can get 404 status and implement…
0
votes
1 answer

Blazor navigate to same URL but different id

I have problem when navigating from "/vehicle-definitions/1/can-networks/5" to "/vehicle-definitions/1/can-networks/6" Basically, what happens is nothing. I would like and excepted behaviour is to load this new page with id 6, load from database,…