In an MVC project, I have an ActionLink, which, when clicked, should take an arbitrary number of objects associated with the user (supplied as a List), dynamically build a CSV file of the objects’ attributes and prompt a download. The file shouldn’t persist on the server, so it either needs to be removed after download or the download needs to come from a stream or similar. What’s the neatest way of going about this? I’ve seen examples of this which manually compile a CSV string and use HttpResponse.Write(String) within the controller, but is this best practice?
In an MVC project, I have an ActionLink, which, when clicked, should take an
Share
I have a function that is similar to this. I’m sure there is a “better” way to automatically find each of the members of the User object you pass it, but this way works.