web page Save Dialog specify folder?

Discussion in 'ASP .Net' started by Bryan Ax, May 26, 2005.

  1. Bryan Ax

    Bryan Ax Guest

    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
     
    Bryan Ax, May 26, 2005
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.austin.rr.com
    Replies:
    1
    Views:
    798
    Kevin
    Apr 25, 2005
  2. Bob Barrows [MVP]

    Re: save file dialog window from a web page

    Bob Barrows [MVP], Sep 11, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    2,280
    Bob Barrows [MVP]
    Sep 11, 2005
  3. BusyBoy
    Replies:
    2
    Views:
    793
    =?Utf-8?B?TGVvbiBNYXluZQ==?=
    Oct 31, 2006
  4. subhadip
    Replies:
    0
    Views:
    775
    subhadip
    Mar 28, 2007
  5. hell2heaven
    Replies:
    0
    Views:
    547
    hell2heaven
    Oct 26, 2008
  6. rmunson8

    save file dialog window from a web page

    rmunson8, Sep 10, 2005, in forum: ASP General
    Replies:
    2
    Views:
    261
    Bob Barrows [MVP]
    Sep 11, 2005
  7. PP
    Replies:
    0
    Views:
    177
  8. Arnaud
    Replies:
    1
    Views:
    173
    Nathan Sweet
    Mar 3, 2004
Loading...