title: Fire javascript during asp.net postback (to show css loader/spinner)
body: <p>I'm trying to show a CSS spinner during the asp.net postback (more specifically during a file upload to the server).</p>
  
  <p>My spinner is located centralized in the master page, and inside a div named "dvProgress".</p>
  
  <p>My javascript code looks like this:</p>
  
  <pre><code>    $(document).ready(function () {
          $("div[id$=dvProgress]").fadeOut(500);
      });
  
      $(document).ajaxStart(function () {
          $("div[id$=dvProgress]").fadeIn(100);
      });
  
      $(document).submit(function () {
          $("div[id$=dvProgress]").fadeIn(100);
      });
  </code></pre>
  
  <p>This works between pages and other things, but during an upload, for example, it doesn't work. It seems that the problem is in asp.net postbacks.</p>
  
  <p>What I can do to show a spinner in these situations?</p>