[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Collapse]File Management
   [Expand]Product Information
   [Collapse]File Manager
     ASPxFileManager Overview
    [Expand]Visual Elements
    [Expand]Member Tables
      How to: Implement a LINQ to SQL Based File System Provider
      How to: Specify the File Manager Root Folder
   [Expand]File Upload
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Specify the File Manager Root Folder

This topic contains the following sections.

Expanded How to Specify a UNC Path to the File Manager Root Folder

ASPxFileManager supports the following ways of specifying a UNC path to the root folder.

  • Path to a folder within the web application

  • Path to a network folder

  • Relative path to a folder

    You can specify a path relative to the current site folder.

    When ASPxFileManager retrieves content from a database, the control root folder can be specified relative to the database root node.

  • Absolute path to a folder on a local disc

    Note that ASPxFileManager builds a tree view for the entire folder hierarchy by default. Therefore, if you set a local disc as the root folder (e.g., RootFolder="c:\"), the server and the browser may not be able to process such a large amount of data. In this case, use the folder's virtual mode, which greatly reduces both server load and start-up time when working with complex hierarchies. In virtual mode, data is retrieved on the server in portions (on a client request, at start-up and when expanding folders). In essence, a folder's content is created and initialized only when the folder is expanded for the first time. This allows you to efficiently use server resources and avoid retrieving all of the hierarchical data for the file manager.

    To enable this mode, set the FileManagerSettingsFolders.EnableCallBacks property to true.

Expanded How to Display an FTP Folder within the File Manager

The best way to use FTP with ASPxFileManager is to implement your own custom system provider as a descendant of the PhysicalFileSystemProvider class. After that, you need to override the appropriate functions to implement the desired functionality, such as file browsing, file transfer, etc.

In the code example below, the FileSystemProviderBase class descendant is created, where the FileSystemProviderBase.GetFiles and the FileSystemProviderBase.GetFolders functions are overridden. It allows the display of files and folders within ASPxFileManager obtained from an FTP server. Note that the example is for illustration purposes only, and does not actually support uploading or downloading. You can implement your own algorithms to extend the class with these functions.

Expanded How to Retrieve Data from Other File Systems (virtual directory, cloud services, etc.)

If you know the file system path to a real folder, you can set the file system folder as the root folder, as described in the How to Specify a UNC Path to the File Manager section.

Alternatively, you can implement a custom file system provider to populate ASPxFileManager with custom file data. See the Custom File System Provider article and the ASP.NET File Manager - Create A Custom File System Provider blog post for details.

Is this topic helpful?​​​​​​​