Skip to main content

BuilderFactoryExtensions.BootstrapUploadControl(BuilderFactory) Method

Creates an Upload control.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll

Declaration

public static BootstrapUploadControlBuilder BootstrapUploadControl(
    this BuilderFactory builderFactory
)

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to Upload settings.

Returns

Type Description
BootstrapUploadControlBuilder

A builder for an Upload control.

Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

The code sample below demonstrates how you can use this method to create an Upload control.

@(Html.DevExpress()
    .BootstrapUploadControl()
    .Routes(routes => routes
        .MapRoute(r => r
            .Action("ProcessUploadedFile")
            .Controller("Editors")))
    .ValidationSettings(validation => validation
        .AllowedFileExtensions(".jpg", ".jpeg", ".gif", ".png")
        .MaxFileSize(4194304))
    .ClientSideEvents(events => events
        .FileUploadComplete("onFileUploadComplete")
        .FilesUploadStart("onFilesUploadStart"))
    )
See Also