Skip to main content
A newer version of this page is available. .
Tab

FileManagerFile.Folder Property

Gets the parent folder to which the current file belongs.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll

NuGet Package: DevExpress.Web

Declaration

public FileManagerFolder Folder { get; }

Property Value

Type Description
FileManagerFolder

A FileManagerFolder object representing the file’s immediate parent.

Remarks

Use the Folder property to identify the parent folder which owns the current file.

Example

The code below allows end-users to upload only mp3 files to the “Music mp3” folder.

protected void ASPxFileManager1_FileUploading(object source, DevExpress.Web.FileManagerFileUploadEventArgs e) {
      if (e.File.Folder.FullName == "Files\\Music mp3")
            if (e.File.Extension != ".mp3") {
                e.Cancel = true;
                e.ErrorText = "You can only upload mp3 files to this folder";
            }
}
See Also