Change Text Content and Styles During Progress
21 Aug 20261 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.
@Html.EJS().ProgressButton("upload").Content("Upload").EnableProgress(true).CssClass("e-hide-spinner").Duration(4000).Begin("begin").End("end").Render()
<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>public ActionResult Default()
{
return View();
}