From 549d747b9e29e5c5989314fb2b5e70e9e2d80810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SAL=C4=B0H=20=C3=96ZKARA?= Date: Tue, 6 Aug 2024 18:07:18 +0300 Subject: [PATCH] Fix post resubmit --- .../src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml.cs index de1f9dfdb0..f13936a5af 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml.cs @@ -98,7 +98,9 @@ namespace Volo.Blogging.Pages.Blogs.Posts await GetData(); - return Page(); + // PRG pattern + // Redirect to the same page to prevent form resubmission + return RedirectToPage(); } private async Task GetData()