Here is the solution.
This works after adding a dependency injection for NavigationManager, and IUriHelper has been replaced with NavigationManager.
@inject NavigationManager Navigation;
Reference link:
https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazor-updates-in-net-core-3-0-preview-9/
Share with