I want to create a link on a ASP.NET page that grabs data from a datasource and then outputs that stream to the browser as a text file.
For example, I have data that the user will probably want to see in Excel. Rather than write the data to the web server disk, is there a way that I can work it so that this is generated in the resultant HTML.:
<a href="textfile.csv">Excel Formatted Data</a>
When the user clicks the link, because it's a CSV file, it will open in Excel (usually). I want the "textfile.csv" to be the most recent snapshot of my datasource, BUT I don't want to have to (or probably won't be able to) write a temporary file to the web server disk.
Is there a "virtual file" or something that can be created in a memory or something?