What should I use to write a file in response? I see these two different options. The first option is to read the file in the stream, and then write the bytes to the browser using
Response.BinaryWrite(new bytes[5])
The next option is to simply write the file from the file system directly from Response.WriteFile. Any advantages / disadvantages with any approach?
Edit: Fixed typos
source
share