0

Dear guys,

Can anyone help me out to open up a windows default dialog box in C# to browse folder and the folder path be displayed in the lab/edit box.

Regards,
Ali

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Joysokn
0
OpenFileDialog fdlg = new OpenFileDialog();
            fdlg.Title = "C# Corner Open File Dialog";
            fdlg.InitialDirectory = @"c:\";
            fdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*";
            fdlg.FilterIndex = 2;
            fdlg.RestoreDirectory = true;
            if (fdlg.ShowDialog() == DialogResult.OK)
            {
                string x = fdlg.FileName;
            }

Edited by Dani: Formatting fixed

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.