Hi how can I display selected folder name in textbox. I have 3 Folder. It display the 2 folders in the textbox but the other one it won't display.
For example:
C:\EmpRecord\Details\Name\MiddleName\Lastname
The 2 folder name display without a problem.
For the Middlename here's the code:
middleName.Text = Path.GetFileName(Path.GetDirectoryName(folderBrowserDialog1.SelectedPath));
Lastname:
lastName.Text = new DirectoryInfo(folderBrowserDialog1.SelectedPath).Name;
For the Name it doesn't display in the textbox. How can I display it in textbox?