How To

6 Apr 2018 / 1 minute to read

Render ProgressBar from code behind

ProgressBar can be rendered from the code behind by initializing the required properties in controller and passing those properties via ViewData or Model to the client side

The following code illustrates the rendering of ProgressBar using ProgressBar properties from code behind.

@{Html.EJ().ProgressBar("progress", Model).Render();}
public ActionResult Index()
        {
            ProgressBarProperties Obj = new ProgressBarProperties();
            Obj.Text = "Loading...";
            Obj.Value = 60;
            return View(Obj);
        }