# FolderBrowserDialog

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [CommonDialog](/api/wisej.web/common-dialogs/wisej.web.commondialog.md)
  * [FolderBrowserDialog](/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialog.md)

Allows the user to select a folder from one of the [Roots](#roots).

{% tabs %}
{% tab title="C#" %}

```csharp
public class FolderBrowserDialog : CommonDialog
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class FolderBrowserDialog
    Inherits CommonDialog
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) FolderBrowserDialog()

Initializes a new instance of [FolderBrowserDialog](/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialog.md).

### ![](/files/hsR4ok3152WyAf8J2C1u) FolderBrowserDialog(roots)

Initializes a new instance of [FolderBrowserDialog](/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialog.md) using the initial *roots* .

| Name      | Type                                                                                 | Description                                                                                                                |
| --------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| **roots** | [IFileSystemProvider\[\]](/api/wisej.core/general/wisej.core.ifilesystemprovider.md) | Initial file systems to load in the [FolderBrowserDialog](/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialog.md). |

### ![](/files/hsR4ok3152WyAf8J2C1u) FolderBrowserDialog(container)

Initializes a new instance of the [FolderBrowserDialog](/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialog.md) extender with a specified container.

| Name          | Type                                                                                 | Description                                                                                                                                                                                                                   |
| ------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **container** | [IContainer](https://docs.microsoft.com/dotnet/api/system.componentmodel.icontainer) | An [IContainer](https://docs.microsoft.com/dotnet/api/system.componentmodel.icontainer) that represents the container of the [FolderBrowserDialog](/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialog.md) component. |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Description

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the description splayed above the tree view control in the dialog box. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Roots

[FileDialogRootCollection](/api/wisej.web/common-dialogs/wisej.web.filedialogrootcollection.md): List of root [IFileSystemProvider](/api/wisej.core/general/wisej.core.ifilesystemprovider.md) file systems displayed by the FolderBrowserDialog.

The Roots collection and the [IFileSystemProvider](/api/wisej.core/general/wisej.core.ifilesystemprovider.md) implementations allow the application to use arbitrary names mapped to a specific path.\
For example, the app may add a root object named "Documents" to "c:\users\[logged-user-id]\files\documents". Each user will see "Documents" as the root, but will also see only the files in the \[logged-user-id] directory.\
The deafult value is an empty [FileDialogRootCollection](/api/wisej.web/common-dialogs/wisej.web.filedialogrootcollection.md)

### ![](/files/hsR4ok3152WyAf8J2C1u) SelectedPath

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns sets the path selected by the user. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ShowHelp

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the Help button is displayed in the file dialog box. (Default: `False`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Title

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the file dialog box title. (Default: `""`)

## Methods

### ![](/files/lzopMboA31bVq8UIcbT3) CreateUI()

**Returns:** [Form](/api/wisej.web/containers/form.md).

### ![](/files/hsR4ok3152WyAf8J2C1u) GetRoot(path)

Returns the [IFileSystemProvider](/api/wisej.core/general/wisej.core.ifilesystemprovider.md) that contains the specified *path* .

| Parameter | Type                                                          | Description                                                   |
| --------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
| **path**  | [String](https://docs.microsoft.com/dotnet/api/system.string) | Full path of the file to locate in on of the [Roots](#roots). |

**Returns:** [IFileSystemProvider](/api/wisej.core/general/wisej.core.ifilesystemprovider.md). The [IFileSystemProvider](/api/wisej.core/general/wisej.core.ifilesystemprovider.md) that contains the specified *path* or null if not found.

### ![](/files/hsR4ok3152WyAf8J2C1u) MapPath(folderPath)

Maps the virtual path to the corresponding physical path on the specific [IFileSystemProvider](/api/wisej.core/general/wisej.core.ifilesystemprovider.md) implementation.

| Parameter      | Type                                                          | Description                                             |
| -------------- | ------------------------------------------------------------- | ------------------------------------------------------- |
| **folderPath** | [String](https://docs.microsoft.com/dotnet/api/system.string) | Virtual path to map to the corresponding physical path. |

**Returns:** [String](https://docs.microsoft.com/dotnet/api/system.string). The physical path for the [IFileSystemProvider](/api/wisej.core/general/wisej.core.ifilesystemprovider.md) implementation.

### ![](/files/hsR4ok3152WyAf8J2C1u) OnLoadPath(e)

Fires the [LoadPath](#loadpath) event.

| Parameter | Type                                                                                                  | Description                                                                                                                                  |
| --------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [FileDialogLoadPathEventArgs](/api/wisej.web/common-dialogs/wisej.web.filedialogloadpatheventargs.md) | A [FileDialogLoadPathEventArgs](/api/wisej.web/common-dialogs/wisej.web.filedialogloadpatheventargs.md) object that provides the event data. |

### ![](/files/hsR4ok3152WyAf8J2C1u) Reset()

Resets all properties to their default values.

## Events

### ![](/files/hsR4ok3152WyAf8J2C1u) LoadPath

[FileDialogLoadPathEventHandler](/api/wisej.web/common-dialogs/wisej.web.filedialogloadpatheventhandler.md) Fired when the file dialog is loading a file or folder.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/common-dialogs/wisej.web.folderbrowserdialog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
