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 on the server, just have the user save it then clear out the string. Is this possible? I looked at SaveFileDialog but wasn't sure if it would accomplish this. Any help is appreciated, thanks!
Asked
Active
Viewed 2,561 times
2 Answers
2
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.

Novakov
- 3,055
- 1
- 16
- 32
2
You need to set certain headers to raise a file dialog box on the client. I think this is what you mean.
See here:

Tim Rogers
- 21,297
- 6
- 52
- 68
-
thank you! that led me down the path of finding this thread: http://social.msdn.microsoft.com/Forums/en/csharplanguage/thread/4f934429-08f4-464d-b028-ab4936029eb9 which was exactly what i needed. – Drew Nov 21 '11 at 18:52