Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

RedirectToPage() not working from AJAX handler

$
0
0

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?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>