R J

R J

  • NA
  • 380
  • 70.4k

how to browse both folders and files at a time

Sep 6 2010 8:21 AM
hi..
 
   I have one browse button and one text box. In the browse_button click event, I would like to browse the files and place the path name into textbox. For this i'vw written code like this by using openfile dialog.

private void brwsbtn_Click(object sender, EventArgs e)
        {
            if (openFD.ShowDialog() == DialogResult.OK)
            {
                  textBox1.Text = openFD.FileName;
            }
            textBox1.Text="";
        }

So that  i am able to select files only. how can i select and place the folders path in textbox.

Answers (3)