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

后端 未结 2 507
夕颜
夕颜 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.

    0 讨论(0)
  • 2021-01-27 03:33

    You need to set certain headers to raise a file dialog box on the client. I think this is what you mean.

    See here:

    http://support.microsoft.com/kb/260519

    0 讨论(0)
提交回复
热议问题