Skip to main content

ExtensionsFactory.UploadControl(UploadControlSettings) Method

Creates a UploadControl.

Namespace: DevExpress.Web.Mvc.UI

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public UploadControlExtension UploadControl(
    UploadControlSettings settings
)

Parameters

Name Type Description
settings UploadControlSettings

A UploadControlSettings object containing UploadControl extension settings.

Returns

Type Description
UploadControlExtension

A UploadControlExtension object implementing the UploadControl functionality.

Remarks

The example below demonstrates how to enable drag-and-drop support in the Upload Control extension and allow users to upload multiple files simultaneously:

@Html.DevExpress().UploadControl(settings => {
    settings.Name = "UploadControl";
    settings.ShowUploadButton = true;
    settings.ShowProgressPanel = true;
    settings.UploadMode = DevExpress.Web.UploadControlUploadMode.Advanced;
    settings.AdvancedModeSettings.EnableMultiSelect = true;
    settings.AdvancedModeSettings.EnableFileList = true;
    settings.AdvancedModeSettings.EnableDragAndDrop = true;
}).GetHtml()

View Example: Upload Control for ASP.NET MVC - How to upload multiple files simultaneously

See Also