title: Display loading icon during Page.Redirect
body: <p>I'm trying to have some sort of Loading Icon to appear between pages of my web form. Some of the pages take a while to load due to calls to web services.</p>
  
  <p>I am trying to implement a loading spinner during these page redirects till the page is ready.</p>
  
  <p>I have tried to achieve this with a simple:</p>
  
  <pre><code>Jquery
  $(window).load(function () {
      $('#LoadingPanel').fadeOut(2000);
  })
  
  html
  &lt;div id="LoadingPanel" style="background-image: url(Images/loading_spinner.gif); background-position: center center; background-repeat: no-repeat; background-size: 100px 100px; height: 100px; width: 100px; position: fixed; z-index: 1000; left: 50%; top: 50%; margin: -25px 0 0 -25px"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The only problem with this is that is doesn't actually appear till a minute into the page load.</p>
  
  <p>Is what I am trying to achieve possible? Any guidance would be greatly appreciated.</p>
  
  <p><em>UPDATE</em></p>
  
  <p>Page1 : On the first page the user fills out a form and then hits a button which will save the user entry and then redirect to another page. </p>
  
  <pre><code>Protected Sub Btn_BestBuy_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btn_BestBuy.ServerClick
  
      StoreDetails(sender, e)
      Response.Redirect("Plugin.aspx?step=4&amp;results=best&amp;stdid=" &amp; STDID.Value &amp; "&amp;stid=" &amp; STID.Value &amp; IIf(Session("sid") &lt;&gt; "", "&amp;sid=" &amp; Session("sid"), ""))
  
  End Sub
  </code></pre>
  
  <p>StoreDetails() Saves the user entries to a array and then moves the array to a session:</p>
  
  <pre><code>Application("DETAILS_ARRAY") = DetailsArray
  </code></pre>
  
  <p>Page2: One the second page the page does a web service call using the details entered in the first page:</p>
  
  <pre><code>If Request.QueryString("results") = "best" Then
  
      GetSchemes(Service.PublicBestType.ALL)
  
  End If
  </code></pre>
  
  <p>GetSchemes calls the web-service and returns all the data into a session which is bound to a grid-view at the bottom of the page load. </p>
  
  <p>What it looks like is happening is when the page starts to bind the data to the grids the Loading icon appears. </p>