Solved

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

Posted on 2010-09-13
3
421 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

728 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