How do I construct a list of strings in JavaScript and pass it to window.location
such that it will show up as List<string>
on the C# side of the fence?
(Not using Ajax POST, but instead using window.location
)
Example ASP.NET MVC Controller action:
public FileResult GetMyCsvFile(List<string> columnNames)
{
...
}
Example JavaScript:
$('export-button').click(function (e) {
e.preventDefault();
// TODO: How do I construct the next line(s) such that it can pass a list of strings to my C# controller action?
window.location = ROOT_PATH + "Home/GetMyCsvFile ... ????
});