I'm using Razor Pages and have a handler called OnPostDeleteAsync()
. The handler is working but, after the item is deleted, I want to refresh the page.
I could refresh the page from my JavaScript code but would do it from my server-side handler if possible.
I've seen a lot of code examples that seem to do this using return RedirectToPage()
. But I cannot get this to work from my AJAX handler. It just works normally, no error, but there is no page refresh or redirect.
Does anyone know why this might not work?