• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 453
  • Last Modified:

How can I use the equivalent of "SaveFileDialog" in an asp.net web page?

Can someone please give me an example or idea of how I can accomplish this?

I have done this using Windows Forms as....

   SaveFileDialog saveFile = new SaveFileDialog();
                saveFile.Filter = "Text Files (*.txt)|*.txt|" + "All Files|";
                saveFile.DefaultExt = "txt";
                saveFile.Title = "Save My File As";
                saveFile.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);

                if (saveFile.ShowDialog() == DialogResult.OK)..................................


0
devnewbee
Asked:
devnewbee
3 Solutions
 
guru_samiCommented:
0
 
käµfm³d 👽Commented:
Web pages do not have access to a client machine's local file system. You will be restricted to however the browser employed by your user decides to show a save file prompt.
0
 
ghayasurrehmanCommented:
you can do this by changing headers of the http context

http://aspalliance.com/259

check the url, if you describe the extension in header, it will force the same
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now