web page Save Dialog specify folder?

B

Bryan Ax

Every time I've worked with saving files from the web, I have always
used code like the following to force a save dialog where a consumer
can choose to open or save the file.

string fileName = "somefile.xml";
Response.ContentType = "binary/octet";
Response.AddHeader("Content-Disposition", "attachment; filename=" +
fileName + "");
Response.Flush();
Response.Write(file);

This works fine. However, I have a client with a request to force a
default folder in the Save dialog window, i.e. default the save dialog
to go to the user's My Documents folder, or some other. However, I
don't believe this is possible. I've never found a way to do it, and my
research in this group and others suggests that there is no way to
force a Save dialog to start in a given folder (which makes sense, for
security reasons, etc.). I'm just looking for confirmation of this that
I can communicate to the client, or, if someone knows some code or a
third party tool that can help assist with this client request, I'd
appreciate that, too. I still stick to my guns that it's not
possible...

Sincerely,

Bryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top