title: Show loading icon while the page is getting loaded from server side, in mvc
body: <p>I have a mvc application. The view gets loaded with data from server side. While the page is loading, there is a delay due to lot of data. Until the page gets rendered and fully loaded in the browser i need to show a loading icon to the user.
  I have done this for client side loaded pages, through jquery and knockout. But for server side loaded pages i m not able to find anything.
  I tried adding a div to the view and then used the below code in my .cshtml file</p>
  
  <pre><code> Response.Write("&lt;Script&gt;document.getElementById('progressdivmaster').style.display = 'block';&lt;/script&gt;");
  </code></pre>
  
  <p>To refer the div and display.I know this is very stupid, as the page is not rendered by then and the code returns me an error saying "getelementid is null".</p>
  
  <p>Is it possible to show a loading icon before the page gets rendered? If yes then someone please tell me. :(</p>