title: How to use page load indicator/progress bar in MVC
body: <p>Here is my model:</p>
  
  <pre><code>public class Pitchermodels
  {
  InsideEdEntities ieEntity = new InsideEdEntities();
  PitcherProfileEntities ppEntity = new PitcherProfileEntities();
  
  Pitcher5model p5Mod = new Pitcher5model();
  Pitcher6model p6Mod = new Pitcher6model();
  
  public Pitcher5model pitcher5(long? _pid)
      {
          if (p5Mod.exist(_pid) == true)
          {
              p5Mod.playerinfo = ieEntity.ppsproc_playerinfo(_pid).FirstOrDefault();
              p5Mod.ListP5T1 = ppEntity.ppsproc_newP5_T1(_pid).ToList();
              p5Mod.ListP5T2 = ppEntity.ppsproc_P5_T2(_pid).ToList();
              return p5Mod;
          }
          else
          {
              return null;
          }
      }
  
   public Pitcher6model pitcher6(long? _pid)
      {
          if (p6Mod.exist(_pid) == true)
          {
              p6Mod.playerinfo = ieEntity.ppsproc_playerinfo(_pid).FirstOrDefault();
              p6Mod.ListP6T1 = ppEntity.ppsproc_P6(_pid).ToList();
              return p6Mod;
          }
          else
          {
              return null;
          }
      }
  }
  </code></pre>
  
  <p>Here's my Controller:</p>
  
  <pre><code>public ActionResult AllPitchers(long? _pid)
      {
          Pitchermodels pMods = new Pitchermodels();
          return View(pMods);
      }
  </code></pre>
  
  <p>And here's my View:</p>
  
  <pre><code>@model MVCdodgersplayerinfohub.Models.Pitchermodels
  @{
      Layout = null;
  }
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta name="viewport" content="width=device-width" /&gt;
  &lt;title&gt;All Pitcher Reports&lt;/title&gt;
  &lt;link href="~/LA.ico" rel="shortcut icon" type="image/x-icon" /&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div&gt;
          @Html.Partial("Pitcher5",Model.pitcher5(Convert.ToInt32(Request.QueryString["_pid"])))
      &lt;/div&gt;
      &lt;p style="page-break-before:always;"&gt;&lt;/p&gt;
      &lt;div&gt;
          @Html.Partial("Pitcher6",Model.pitcher6(Convert.ToInt32(Request.QueryString["_pid"])))
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The one thing that isn’t so good is that it took maybe 2+ minutes to load, and it appears to the user like it might not even load (the mouse just spins). Is it possible to put in a progress bar?  I think most users like progress bars because at least they know it’s working, and about how long it will take.</p>