Back to Devexpress

UploadControlSettings Class

aspnetmvc-devexpress-dot-web-dot-mvc-9378b5f6.md

latest3.0 KB
Original Source

UploadControlSettings Class

Contains the UploadControl extension settings.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public class UploadControlSettings :
    SettingsBase
vb
Public Class UploadControlSettings
    Inherits SettingsBase

Remarks

To declare the UploadControl in a View, invoke the ExtensionsFactory.UploadControl helper method. This method returns the UploadControl extension that is implemented by the UploadControlExtension class.

To configure the UploadControl extension, pass the UploadControlSettings object to the ExtensionsFactory.UploadControl helper method as a parameter. The UploadControlSettings object contains all the UploadControl extension settings.

Refer to the UploadControl Overview topic to learn how to add the UploadControl extension to your project.

Example

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

razor
@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

Inheritance

Object SettingsBase UploadControlSettings

See Also

UploadControlSettings Members

File Upload

UploadControlExtension

DevExpress.Web.Mvc Namespace