I have a database column that contains the contents of a file. I'm converting this into a byte[] on the server (I don't want to save the file to the disk) and then want to send this to the client to download. The file can be any thing (pdfs, pics, word, excel, etc).
I have the file name so I know the extension but I'm not sure how the best way to send it to the client is. Here's where I'm currently at:
string fileName = ds.Tables[0].Rows[0]["form_file_name"].ToString();
byte[] fileContents = (byte[])ds.Tables[0].Rows[0]["form_file_contents"];
Where do I go from here?