Reputation: 79
Simple doubt here...
in asp.net core MCV controller I could redirect to some pages using RedirectToAction("Action", "Controller") from server side.
Is there any way to do it using Blazor Server Side?
Thank you!
Upvotes: 1
Views: 2430
Reputation: 36575
In blazor server side, you could redirect to page by using NavigationManager
:
@inject NavigationManager NavManager
<p>Redirecting to Page</p>
@code {
protected override void OnInitialized()
{
NavManager.NavigateTo("/fetchdata");
}
}
Upvotes: 1