-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Consider a form like the following that POSTs to an endpoint that returns a FileContentResult:
<form asp-action="Download" asp-controller="Home">
<button type="submit" name="format" value="PDF">Download PDF</button>
<button type="submit" name="format" value="Excel">Download Excel</button>
</form>When using this form with aspnet-client-validation, a hidden input gets created upon submit button click in order to POST the button's value. It seems this behavior was introduced here in order to work around limitations of .submit() in JavaScript: #52
The issue with this is that the hidden input does not get cleaned up after instantiation, and the page does not reload in this instance due to the nature of a FileContentResult endpoint. This causes conflicts when clicking a different submit button later as the hidden input will override its value due to possessing the same name attribute value ("format").
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working