1
0

Automatically navigate back to servers page after submitting form for editing server.

With dependancy injection of the NavigationManager.
This commit is contained in:
Kevin Matsubara 2025-03-24 17:49:30 +01:00
parent 353df277e5
commit 6090fea796

View File

@ -1,6 +1,8 @@
@page "/servers/{id:int}"
@* Route constraints: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-9.0#route-constraints *@
@inject NavigationManager NavigationManager
<h3>Edit server</h3>
<br/>
<br/>
@ -67,5 +69,7 @@
{
ServersRepository.UpdateServer(server.Id, server);
}
NavigationManager.NavigateTo("/servers");
}
}