4

I'm working on asp.net mvc web application development, where I need to create a CSV file in-memory and send as attachment of email.

I had a look at this stack overflow solution below: Export C# List to Csv file

Unfortunately, this solution returns File Result and doesn't fit with my requirement.

Any help will be much appreciated.

Community
  • 1
  • 1
Nil Pun
  • 17,035
  • 39
  • 172
  • 294
  • 3
    An example of mailing an attachment from a memory stream: http://stackoverflow.com/questions/5336239/how-to-attach-a-file-from-memorystream-to-a-mailmessage-in-c-sharp Just try and put it together with the link that you posted in your question. SEt the mime type to text/csv. Hope this helps. – mortb May 27 '13 at 11:23

0 Answers0