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

前端 未结 6 456
情书的邮戳
情书的邮戳 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:44

    You could write direcly to the Response.OutputStream and set the right content type, and content disposition header.

提交回复
热议问题