---
title: "FolderBrowserDialog Control in C#.Net"  
description: "FolderBrowserDialog Control in C#.NetThe FolderBrowserDialog control is used to browse and select a folder. FolderBrowser class in framework provide"  
author: "Pushpendra Singh"  
published: 2011-01-24  
updated: 2020-09-06  
canonical: https://www.mindstick.com/articles/420/folderbrowserdialog-control-in-c-sharp-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# FolderBrowserDialog Control in C#.Net

## FolderBrowserDialog Control in C#.Net

The [FolderBrowserDialog](https://www.mindstick.com/articles/298/folderbrowserdialog-control-in-vb-dot-net) [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is used to browse and select a folder. FolderBrowser class in [framework](https://yourviews.mindstick.com/view/81101/time-for-improvement-in-healthcare-facility-framework) provides the FolderBrowserDialog control.\

## How to use FolderBrowserDialog Control

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) FolderBrowserDialog control [from toolbox on the](https://www.mindstick.com/articles/399/datetimepicker-control-in-c-sharp-dot-net) [window Form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/898cb389-c9b5-43b6-a0b2-e78a6ad26592.png)

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/c2483652-ad65-4ae7-9249-026e02d3c36d.png)

Drag and drop button and [textbox](https://www.mindstick.com/articles/320/textbox-control-in-vb-dot-net), a button for showing browser dialog and textbox to show the selected path.

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/93f7ba8a-ff62-4953-9dbc-8030f787b49b.png)

#### Code:

Write the code on [the Button click event](https://www.mindstick.com/articles/1153/adding-and-removing-nodes-in-treeview-c-sharp).

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/0bb20941-bea8-4fd0-8dad-199810fea9ef.png)

[Double click](https://www.mindstick.com/forum/156225/differentiate-between-google-adword-and-double-click) on Click event to open Button click [event handler](https://www.mindstick.com/forum/1371/c-sharp-dot-net-event-handler-delegate-question).

```
private void btnFolderBrowser_Click(object sender,  EventArgs e){            // folderBrowserDialog will open            folderBrowserDialog1.ShowDialog();            //selected pathe in folderBrowserDialog will show in textbox            textBox1.Text = folderBrowserDialog1.SelectedPath;}
```

**Run the project**

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/83b8f71b-16ca-4269-9835-3909c5974afe.png)

When you click BrowseFile button then FolderBrowserDialog will open.

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/ba2a40bf-4388-4a78-b49e-dc1e508279b0.png)

Select Folder

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/524ff9d0-5b76-4b8c-89b2-3700deb62a05.png)

When you select File and click the **ok** button then the selected path will show in the textbox.

![FolderBrowserDialog Control in C#.Net](https://www.mindstick.com/mindstickarticle/41b8dcf9-54f5-4605-97e6-b8a13ffe712a/images/3e6312c4-e00e-45a9-b1a8-5f44c81e60ba.png)

---

Original Source: https://www.mindstick.com/articles/420/folderbrowserdialog-control-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
