Display Save File Dialog for a string ASP.NET C#?

后端 未结 2 508
夕颜
夕颜 2021-01-27 03:00

I am generating a string, which right after generating I want to display a save dialog to allow this to be saved to the user\'s local machine. I don\'t want to save it to a file

2条回答
  •  野的像风
    2021-01-27 03:11

    You cannot show SaveFileDialog in the asp.net code because it is executed on the server side. You can send that generated string to user's browser with HTTP headers indicating that this is an attachment.

提交回复
热议问题