In ASP.NET, how to get the browser to download string content into a file? (C#)

前端 未结 6 418
情书的邮戳
情书的邮戳 2021-01-13 06:27

I would like to create a text file for export/download, like a *.csv, from an ASP.NET application. I know about Response.TransmitFile, but I want to do this without creating

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-13 06:52

    A file you haven't saved yet is just a string variable or a MemoryStream. But for large amounts of data you probably don't want to keep it all in memory. What do you want to do with this "file" once you have it?

提交回复
热议问题