Solved

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

Posted on 2010-09-13
3
404 Views
Last Modified: 2012-05-10
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
Comment
Question by:devnewbee
3 Comments
 
LVL 41

Assisted Solution

by:guru_sami
guru_sami earned 150 total points
ID: 33663261
0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 150 total points
ID: 33663318
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
 
LVL 3

Accepted Solution

by:
ghayasurrehman earned 200 total points
ID: 33663542
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

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question