I have a cshtml page with this code:
<form action='@Url.Action("ExportExcel", "Records")' method="post" target="_blank" onsubmit="return exportExcel(), true">
<input type="hidden" name="filteredRecordsIds" id="filteredRecordsIds" value="" />
<input id="btnExportExcel" type="submit" hidden="hidden" />
</form>
in js the exportExcel function:
function exportExcel() {
$('#filteredRecordsIds').val(filteredRecords.map(function (record) { return record.Id }));
return true;
}
in controller Records:
public ActionResult ExportExcel(string filteredRecordsIds)
{...}
I would like to add modal/popup, before the submitting that ask the user:
"Would you like to export with calculations?" with 2 buttons options: "Yes" or "No".
Depending on the user's response, I would like to send the answer to the controller (as second parameter).
How can I add that?
Thank You!