title: How to do things while the page is busy with asp.net?
body: <p>I have an asp.net web application that when you click a button it excecutes all my stuff but it is slow it takes 10 to 15 seconds to work and i dont want users to spam click the button while the site is busy. So my plan was to disable the button and have the label below it become buesy and say "Running" and after it was done the button would reactivate and the label would say "Done" but this dident work as planned here is my code for the button listener.</p>
  
  <pre><code> protected void SubmitButton_Click(object sender, EventArgs e)
      {
          SubmitButton.Enabled = false;
          RunStatus.Text = "Running";
          RunStatus.Visible = true;
          ErrorField.Visible = false;
  
  //i deleted all my code that actually does the stuff that takes time from here
  
          RunStatus.Text = "Done";
          SubmitButton.Enabled = true;
      }
  </code></pre>
  
  <p>the problem is that all the visual stuff happens after the method is run so while it is running nothing changed but after it has the text feild show done. I would also be happy to have a busy cursor but that is of secondary importance.</p>