My controller will start several async method, then my cshtml will show a long time white page. I do not want it.
I want to add a a Indeterminate ProgressBar when these async task is running, and when the task is completed, I want to hide this progressbar.
Thanks.
Xavier
1 Answer, 1 is accepted
0
Ivan Zhekov
Telerik team
answered on 26 Dec 2017, 11:30 AM
Hello, Xavier.
You can add indeterminate progress bar with the following razor syntax:
@(Html.Kendo().ProgressBar()
.Name("pageProgress")
.Value(false)
)
or html / js
<div id="pageProgress"></div>
<script>
var pageProgress = $("#pageProgress").kendoProgressBar({
value: false
}).data("kendoProgressBar")
</script>
Whether you create that progress bar on the fly (with javascript) or initially (with razor), you can show it and hide it when the async tasks start and end.