Reputation: 2156
<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
Upvotes: 5
Views: 11495
Reputation: 7194
Inject NavigationManager
and then use NavigationManager.NavigateTo(<your URL>);
.
Upvotes: 6