Skip to content

Commit

Permalink
Add example with no formaction
Browse files Browse the repository at this point in the history
  • Loading branch information
haacked committed Jan 5, 2024
1 parent 17c5eeb commit b2402b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Pages/Demos/FormAction.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
</div>
<input type="submit" value="Submit" asp-page-handler="Submit" />
<input type="submit" value="Save" asp-page-handler="Save"/>
<input type="submit" />
</form>
2 changes: 1 addition & 1 deletion Pages/Demos/FormAction.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public IActionResult OnPostSave()

public IActionResult OnPost()
{
StatusMessage = "This should not have been called";
StatusMessage = "The button with no formaction was clicked";

return RedirectToPage();
}
Expand Down

0 comments on commit b2402b4

Please sign in to comment.