ASPxFileManager Class

A file management control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll


public class ASPxFileManager :


The ASPxFileManager control allows you to manage files and folders.

ASPxFileManager - ASPxFileManager

Create a File Manager

Design Time

The ASPxFileManager control is available on the DX.20.2: Common Controls toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize the control's settings, or paste the control markup in the page's source code.


To properly function, DevExpress controls require that special modules, handlers and options are registered in the the Web.config file. Switch the Microsoft Visual Studio IDE to the Design tab to automatically update the Web.config file with the required DevExpress information.

<dx:ASPxFileManager ID="fileManager" runat="server" ...>
    <Settings RootFolder="~/Content/FileManager/Files" ThumbnailFolder="~/Content/FileManager/Thumbnails" />
    <SettingsUpload UseAdvancedUploadMode="true">
        <AdvancedModeSettings EnableMultiSelect="true" />

Run Time

using DevExpress.Web;
protected void Page_Load(object sender, EventArgs e)
    ASPxFileManager fm = new ASPxFileManager();
    fm.ID = "ASPxFileManager1";
    fm.SettingsUpload.ValidationSettings.DisableHttpHandlerValidation = true;

    fm.SettingsUpload.UseAdvancedUploadMode = true;
    fm.SettingsUpload.AdvancedModeSettings.EnableMultiSelect = true;

The File Manager requires registering the ASPxUploadProgressHttpHandler in the web.config file. If it's impossible to automatically validate the ASPxUploadProgressHttpHandler, for example, if the handler is registered inside the <location> section and the InheritInChildApplications property is set to false, disable the automatic validation option by setting the DisableHttpHandlerValidation property to false.

Client-Side API

The ASPxFileManager's client-side API is implemented with JavaScript language and exposed by the ASPxClientFileManager object.


Available by default.

Client object type


Access name




See demo

Folder Structure

Use the InitialFolder property to specify the initially selected folder in the file manager, where a user starts browsing. If the property value is empty, the file manager uses the path from the RootFolder property as an initial folder.

<dx:ASPxFileManager ID="ASPxFileManager1" runat="server" Width="700px">
     <Settings RootFolder="~\Files\" ThumbnailFolder="~\Thumbnails\" 
          AllowedFileExtensions=".jpg, .jpeg, .gif, .rtf, .txt, .avi, .png, .mp3, .xml, .doc, .pdf" 
          InitialFolder="Images\Employees" />
     <SettingsEditing AllowCreate="True" AllowDelete="True" AllowMove="True" AllowRename="True" />
               <dx:FileManagerFolderAccessRule Edit="Deny" />
               <dx:FileManagerFolderAccessRule Edit="Allow" Path="Documents\Reports" />

Learn more

Data Binding

The ASPxFileManager allows you to load its content from a database. Assign a data source to the DataSourceID property and map the data source's fields to the file manager (SettingsDataSource).

<dx:ASPxFileManager ID="ASPxFileManager1" runat="server" DataSourceID="AccessDataSource1">
    <SettingsDataSource KeyFieldName="Id" ParentKeyFieldName="ParentID" NameFieldName="Name" 
        IsFolderFieldName="IsFolder" FileBinaryContentFieldName="Data" LastWriteTimeFieldName="LastWriteTime"/>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/FilesCatalog.mdb" 
    SelectCommand="SELECT [ID], [Name], [ParentID], [IsFolder], [Data], [LastWriteTime] FROM [FileSystem]"

See demo

View Modes

The ASPxFileManager supports two file list view modes (View property):

  • Thumbnails - Displays files' thumbnails.
  • Details - Displays information about files in a grid view.
<dx:ASPxFileManager ID="fileManager" runat="server" >
    <SettingsFileList View="Details">
        <DetailsViewSettings AllowColumnResize="true" AllowColumnDragDrop="true" />

Learn more | See demo

Thumbnails Support

ASPxFileManager automatically creates thumbnails for image files with the following file extensions: .bmp, .gif, .ico, .jpg, .jpeg, .png. You can also use the the CustomThumbnail event to provide custom thumbnails for the ASPxFileManager.

<dx:ASPxFileManager ID="fileManager" runat="server" OnCustomThumbnail="fileManager_CustomThumbnail">
public void fileManager_CustomThumbnail(object sender, FileManagerThumbnailCreateEventArgs e) {
    switch(((FileManagerFile)e.Item).Extension) {
        case ".avi":
            e.ThumbnailImage.Url = "Images/movie.png";
        case ".txt":
            e.ThumbnailImage.Url = "Images/txt.png";

Learn more | See demo

Files Upload

Set the Enabled property to true to allow file uploading in the file manager. The file manager supports two upload modes (UseAdvancedUploadMode):

  • Standard Mode - the file manager sends the uploaded file to the server in one request and caches the file in server memory.

  • Advanced Mode - the file manager sends the uploaded file to the server in small packets (one by one) and saves the file into a temporary file within a specific server folder.

<dx:ASPxFileManager ID="fileManager" runat="server" ...>
    <SettingsUpload UseAdvancedUploadMode="true">
        <AdvancedModeSettings EnableMultiSelect="true" />

Learn more | See demo

Custom Filter API

The ASPxFileManager provides APIs that allows you to filter its file list programmatically in a custom manner. For instance, you can write code to display only certain files types (such as images, spreadsheets or rich text documents) or the most recently used files.