I have a main page Transact.razor Page. Inside my Transact Page, there is a button named Add New which will open a MudDialog (AddTransact.razor) where I can add a new transaction. If I were to close the MudDialog (Add Transact), i want to rerender the Transact Page so that the newly added transaction will reflect on the table in the Transact Page.
How do i do that?
I am using blazor server-side .Net 8. Since blazor is a single page application, I want to rerender the page because "refreshing" the page will defeat the purpose of SPA.
What I tried so far is:Transact.razor
private async Task AddNew(){ var options = new DialogOptions { ClassBackground = "my-custom-class", CloseOnEscapeKey = true, MaxWidth = MaxWidth.Medium, FullWidth = true, NoHeader = true }; var dialog = DialogService.Show<AddTransact>("Add New", options); var result = await dialog.Result; if (!result.Cancelled) { await vwTranService.GetAllVwTransactions(); StateHasChanged(); }}somehow, it does not work