0
votes

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!

1

1 Answers

0
votes

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");
    }
}