I have a page that has a model of IEnumerable<Object>.
I can display the data fine, but would like the function to download that list into a CSV.
I have the method that generates a CSV and downloads it to the device, however I'm having issues with passing the IEnumerable into the Method.
I'm trying to use @Url.Action to try and pass the parameter through, but am having issues with it.
My Method is
public FileContentResult ExportToCSV(IEnumerable<Object> objectList)
// Export to CSV Code...
I've tried finding other sources to help but can't seem to get it working, is Url.Action even the method I should be using?