Search results

Customize Button with HTML Element in ASP.NET MVC Uploader control

The uploader control allows you to customize the action buttons by using buttons property. Refer to the following example.

<div class="control_wrapper">
        @Html.EJS().Uploader("UploadFiles").AutoUpload("false").AsyncSettings(new Syncfusion.EJ2.Inputs.UploaderAsyncSettings { SaveUrl = "", RemoveUrl = "" }).Render()

    var uploadEle = ej.base.createElement('span', { className: 'upload e-icons' });
    uploadEle.innerHTML = 'Upload All';
    var clearEle = ej.base.createElement('span', { className: 'remove e-icons' });
    clearEle.innerHTML = 'Clear All';
    window.onload = function (args) {        
    var uploaderObj = document.getElementById("UploadFiles").ej2_instances[0];
        buttons: {
            browse: 'Choose file',
            clear: clearEle,
            upload: uploadEle
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace EJ2CoreSampleBrowser.Controllers.TextBoxes
    public partial class UploaderController : Controller
        public ActionResult DefaultFunctionalities()
            return View();

Output be like the below.