Pass a javascript variable as parameter to @url.Action()
You need to build you url using javascript/jquery. In the view change the link to <a id=”export” href=#”>Export as CSV</a> Then in the script var baseurl=”https://stackoverflow.com/questions/30731582/@Url.Action(“Export”)”; $(‘#export’).click(function() { var url = baseurl + ‘?SelectedAccountType=” + $(“#SelectedAccountType’).val() + ‘&FromDate=” + $(“#FromDate’).val() + ‘&ToDate=” + $(“#ToDate’).val() + …etc location.href=url; }); However if your form is marked with … Read more