title: C# Webforms show Loading indicator during code execution
body: <p>The Webforms application I have is very data heavy, it's mostly ASP controls doing ADO.net operations. I have loading times of anywhere from 5-15 seconds, which is normal, but I'd like to make it more obvious to the user that their request is being processed.  </p>
  
  <p>What I'd like to do is add a loading image or some kind of visual element that will show when server code runs.</p>
  
  <p>ASP:</p>
  
  <pre><code>&lt;telerik:RadButton ID="OKbutton" runat="server"
      Skin="WebBlue"
      Text="OK"&gt;
  &lt;/telerik:RadButton&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>private SqlDataReader dr = null;
  protected void OKbutton_Click(object sender, EventArgs e)
  {
      //Long running query
      string query = "UPDATE Employees SET Salary = 12345 WHERE EmployeeID = 123"
  
      SqlCommand cmd = new SqlCommand(query, db.DbConnection);
  
      dr = cmd.ExecuteReader();
  }
  </code></pre>