Skip to main content

DxUpload.Name Property

Specifies a unique identifier used to associate the Upload component with uploaded files on the server.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public string Name { get; set; }

Property Value

Type Description

A string value that specifies the identifier.


Specify the Name property to associate the Upload component with the server. This property is used to access uploaded files on the server. You should also set the UploadUrl property to the path of a server-side controller’s action that processes upload requests.

<DxUpload Name="myFile" 

On the server side, create a controller with an action that accepts the uploaded file, checks it, and saves it to the target location.

Do one of the following to access the uploaded file:

  • Create an action with a parameter whose name matches the Name property value.

    public ActionResult UploadFile(IFormFile myFile) {
        // ...
  • Use the Name property value to get the uploaded file from form variables.

    public ActionResult UploadFile() {
        // ...
        var myFile = Request.Form.Files["myFile"];
        // ...

The following example demonstrates how to implement the upload controller:

using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace BlazorDemo.AspNetCoreHost;
public class UploadController : ControllerBase {
    public ActionResult Upload(IFormFile myFile) {
        try {
            // Write code that saves the 'myFile' file.
            // Don't rely on or trust the FileName property without validation.
        } catch {
            return BadRequest();
        return Ok();

Run Demo: Upload - Overview

See Also