Skip to main content
Tab

FileManagerSettings.UseAppRelativePath Property

Gets or sets a value indicating whether the path to the current folder within the path box is relative to the root folder or application.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll

Declaration

[DefaultValue(false)]
public virtual bool UseAppRelativePath { get; set; }

Property Value

Type Default Description
Boolean false

true if the path is relative to the application; false if the path is relative to the root folder.

Property Paths

You can access this nested property as listed below:

Show 21 property paths
Library Object Type Path to UseAppRelativePath
ASP.NET Bootstrap Controls BootstrapFileManager
.Settings.UseAppRelativePath
ASP.NET Web Forms Controls ASPxFileManager
.Settings.UseAppRelativePath
HtmlEditorAudioSelectorSettings
.CommonSettings.UseAppRelativePath
HtmlEditorDocumentSelectorSettings
.CommonSettings.UseAppRelativePath
HtmlEditorFileManager
.Settings.UseAppRelativePath
HtmlEditorFileManagerSettingsBase
.CommonSettings.UseAppRelativePath
HtmlEditorFlashSelectorSettings
.CommonSettings.UseAppRelativePath
HtmlEditorImageSelectorSettings
.CommonSettings.UseAppRelativePath
HtmlEditorSelectorSettings
.CommonSettings.UseAppRelativePath
HtmlEditorVideoSelectorSettings
.CommonSettings.UseAppRelativePath
RichEditDocumentSelectorSettings
.CommonSettings.UseAppRelativePath
RichEditFileManager
.Settings.UseAppRelativePath
RichEditFolderManager
.Settings.UseAppRelativePath
SpreadsheetDocumentSelectorSettings
.CommonSettings.UseAppRelativePath
ASP.NET MVC Extensions FileManagerSettings
.Settings.UseAppRelativePath
MVCxFileManager
.Settings.UseAppRelativePath
MVCxHtmlEditorAudioSelectorSettings
.CommonSettings.UseAppRelativePath
MVCxHtmlEditorDocumentSelectorSettings
.CommonSettings.UseAppRelativePath
MVCxHtmlEditorFlashSelectorSettings
.CommonSettings.UseAppRelativePath
MVCxHtmlEditorImageSelectorSettings
.CommonSettings.UseAppRelativePath
MVCxHtmlEditorVideoSelectorSettings
.CommonSettings.UseAppRelativePath

Remarks

Use the UseAppRelativePath property to specify the directory to which the folder path within the path box is relative.

  • true - the path to the current folder within the path box is relative to the application.

    RootFolder="~/Content/FileManager/Files" UseAppRelativePath="true"
    

    ASPxFileManager_UseAppRelativePathTrue

  • false - the path to the current folder within the path box is relative to the root folder.

    RootFolder="~/Content/FileManager/Files" UseAppRelativePath="false"
    

    ASPxFileManager_UseAppRelativePathFalse

Note

The UseAppRelativePath property is not in effect if the root folder is outside the application.

Example

Web Forms (in markup):

<dx:ASPxFileManager ID="fileManager" runat="server" ...>
    <Settings RootFolder="~/Content/FileManager/Files" ThumbnailFolder="~/Content/FileManager/Thumbnails" 
    AllowedFileExtensions=".jpg, .jpeg, .gif, .png" InitialFolder="~/Content/FileManager/Images"
    UseAppRelativePath="true" >
    ...
</dx:ASPxFileManager>

Web Forms (in code):

ASPxFileManager fm = new ASPxFileManager();
fm.ID = "ASPxFileManager1";
fm.SettingsUpload.ValidationSettings.DisableHttpHandlerValidation = true;
Page.Form.Controls.Add(fm);
...
fm.Settings.RootFolder = Url.Content("~/Content/FileManager/Files");
fm.Settings.ThumbnailFolder = Url.Content("~/Content/FileManager/Thumbnails");
fm.Settings.InitialFolder = Url.Content("~/Content/FileManager/Images");
fm.Settings.AllowedFileExtensions=new String[] { ".jpeg", ".jpg", ".gif", ".png" };
fm.Settings.UseAppRelativePath=true;

MVC:

@Html.DevExpress().FileManager( settings => {
    settings.Name = "fileManager";

    settings.Settings.ThumbnailFolder = Url.Content("~/Content/FileManager/Thumbnails");
    settings.Settings.RootFolder = Url.Content("~/Content/FileManager/Files");
    settings.Settings.InitialFolder = "~/Content/FileManager/Images";
    settings.Settings.AllowedFileExtensions= new String[] { ".jpeg", ".jpg", ".gif", ".png" };
    settings.Settings.UseAppRelativePath=true;
    ...
}).BindToFolder(Model).GetHtml()
See Also