Skip to main content

BuilderFactoryExtensions.BootstrapUploadControl(BuilderFactory, String) Method

Creates an Upload control with a specified name.

Namespace: DevExpress.AspNetCore

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

Declaration

public static BootstrapUploadControlBuilder BootstrapUploadControl(
    this BuilderFactory builderFactory,
    string name
)

Parameters

Name Type Description
builderFactory BuilderFactory

A BuilderFactory object providing access to Upload settings.

name String

A control name.

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("defaultUpload")
    .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