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();
}