I am dynamically generating a number of different types of files based upon a GridView in ASP.NET - an Excel spreadsheet and a HTML file. I am doing so using this code (this is
You can save the file contents into a byte array and then do this:
Creating In-Memory Mail Attachments