#Blazor #CoreMVC #EntityFramework
URI and navigation state helpers
Use Microsoft.AspNetCore.Components.NavigationManager to work with URIs and navigation in C# code. NavigationManager provides the event and methods shown in the following table.
@page "/navigate" @inject NavigationManager NavigationManager <h1>Navigate in Code Example</h1> <button class="btn btn-primary" @onclick="NavigateToCounterComponent"> Navigate to the Counter component</button> @code { private void NavigateToCounterComponent() { NavigationManager.NavigateTo("counter"); } }
Tags
Blazor