redirecting to a different page in blazor

Viewed 33
<MudButton ButtonType="ButtonType.Button" OnClick="" Variant="Variant.Filled" Color="Color.Primary" Class="ml-auto">Cancel</MudButton>

Pressing this button must navigate to another page. How do I do this in blazor? In javascript we use DOM object to set the href. Not sure how we do in blazor

1 Answers

Inject NavigationManager and then use NavigationManager.NavigateTo(<your URL>);.

Related