Skip to content

Commit

Permalink
Fix post resubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
salihozkara committed Aug 6, 2024
1 parent efcc490 commit 549d747
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ public virtual async Task<IActionResult> OnPostAsync()

await GetData();

return Page();
// PRG pattern
// Redirect to the same page to prevent form resubmission
return RedirectToPage();
}

private async Task GetData()
Expand Down

0 comments on commit 549d747

Please sign in to comment.