Search results

Change the text content and styles of the ProgressButton during progress in ASP.NET Core ProgressButton control

04 Aug 2021 / 1 minute to read

You can change the text content and styles of the ProgressButton during progress state by changing the text content and the cssClass property at the begin and end events.

tagHelper
default.cs
Copied to clipboard
<ejs-progressbutton id="upload" content="Upload" enableProgress="true" cssClass="e-hide-spinner" duration="4000" begin="begin" end="end"></ejs-progressbutton>

<script>
    function begin() {
        this.content = 'Uploading...';
        this.cssClass = 'e-hide-spinner e-info';
        this.dataBind();
    }

    function end() {
        this.content = 'Success';
        this.cssClass = 'e-hide-spinner e-success';
        this.dataBind();
        setTimeout(() => {
            this.content = 'Upload';
            this.cssClass = 'e-hide-spinner';
            this.dataBind();
        }, 500)
    }
</script>
Copied to clipboard
public ActionResult Default()
{
        return View();
}