Вы можете использовать этот OnLoad или во время извлечения информации из БД
В HTML Добавить следующий код:
<div id="divLoading">
<p id="loading">
<img src="~/images/spinner.gif">
</p>
В CSS добавьте следующий код:
#divLoading {
margin: 0px;
display: none;
padding: 0px;
position: absolute;
right: 0px;
top: 0px;
width: 100%;
height: 100%;
background-color: rgb(255, 255, 255);
z-index: 30001;
opacity: 0.8;}
#loading {
position: absolute;
color: White;
top: 50%;
left: 45%;}
, если вы хотите показать и скрыть от JS:
document.getElementById('divLoading').style.display = 'none'; //Not Visible
document.getElementById('divLoading').style.display = 'block';//Visible