This is my View
<form method="post">
<input type="text" />
<button asp-page-handler="cancel">Cancel</button>
<input type="submit" value="Save"/>
</form>
This is my controller
public async Task<IActionResult> OnPostCancelAsync(int? CaseID) {
// Cancel code
}
public async Task<IActionResult> OnPostAsync() {
// Submit code
}
Pressing the enter key when the cursor is in the textbox causes the Cancel
code to be run. How do I tell it to run the default submit code instead?