locked
Help with OpenFileDialog opening a zip file RRS feed

  • Question

  • I am hoping someone can explain how to use openfiledialog with a zip file so that I can save this zip file somewhere that I can know its path.

    Thanks for any help.

    Monday, August 10, 2009 9:31 AM

Answers

  • OpenFileDialog ofd = new OpenFileDialog();

    ofd.Multiselect = false;

    ofd.Filter = "Zip Files|*.zip;*.rar";

    bool? result = ofd.ShowDialog();

    if (!result.HasValue || result.Value == false)

    return;

    Monday, August 10, 2009 10:55 AM
  • I can save this zip file somewhere that I can know its path.

    It' possible to upload zip file to a known path on server, but not possible on client. The only way to get local file writeable filestream is using SaveFileDialog.

    Thanks,

    Monday, August 17, 2009 12:05 AM

All replies