2
Answers

open folder

mahmud_uk

mahmud_uk

20y
2.4k
1
hi, using the source code from C# Corner i've created this script which let you open a normal file and insert the file path on the text box. Does anyone have any idea of how do i open the folder up, and display the path on the text box. I do not want the file name to be inserted on the text box only the path of the folder. The code: private void button1_Click(object sender, System.EventArgs e) { OpenFileDialog fdlg = new OpenFileDialog(); fdlg.Title = "Open File Dialog" ; fdlg.InitialDirectory = @"c:\" ; fdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*" ; fdlg.FilterIndex = 2 ; fdlg.RestoreDirectory = true ; if(fdlg.ShowDialog() == DialogResult.OK) { textBox1.Text = fdlg.FileName ;} Thanks
Answers (2)