Luca's Luca's - 1 year ago 163
C# Question

Select Folder Path with savefileDialog

Is there a way to using a dialog window to get the folder path without name file?

Answer Source

Check the FolderBrowserDialog

Edit (Added MSDN-Example) for clarification:

// Bring up a dialog to chose a folder path in which to open or save a file.
private void folderMenuItem_Click(object sender, System.EventArgs e)
    // Show the FolderBrowserDialog.
    DialogResult result = folderBrowserDialog1.ShowDialog();
    if( result == DialogResult.OK )
        string folderName = folderBrowserDialog1.SelectedPath;
        ... //Do your work here!
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download