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
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