div.Visible not executing before other code
<p>I am making a web app in asp.net using c# that collects a lot of information from http web services at one time.  Since this data collection process takes 10-20 seconds, I want to display a small loading frame with a small rotating image.</p>

<p>To make this happen on one page, I have a div called <code>loadingdiv</code> for which I set the <code>Visible</code> property of to <code>false</code> during <code>PageLoad</code>.  When my "find movies" button is pressed, the c# code is supposed to hide the content that was originally on the page, show the loading image while loading the web service information in the backend, then hide the loading image and bring up the data display div.  </p>

<p>If I comment out the class that loads the data from the webservices, this works fine.  But as soon as I add my web service information it completely skips over the <code>loadingdiv.Visible = true</code> line and just does the 10-20 second operation.</p>

<p>Here's the relevant lines of code.</p>

<pre><code> protected void btnFindMovies_Click(object sender, EventArgs e)
 {
    //Hides the main content that contained search options for movies
    thisarticle.Visible = false;
    articlediv.Visible = false;
    lblGenres.Visible = false;
    ratingdiv.Visible = false;
    List&lt;int&gt; gList = new List&lt;int&gt;(); //Genre List

    /* Other code that goes through checkboxes to find out which genres 
    to search for in the movie search */

    string title = "Movie Title Here"; 
    Page.Title = title;

    loadingdiv.Visible = true; //Shows loading div before completing search

    MovieSearch search = new MovieSearch(gList);  //Intensive web service use 
    (10-20 seconds)
    loadingdiv.Visible = false; //removes the loading div from the screen
}
</code></pre>

<p>How can I get the <code>loadingdiv</code> to show up while my web service operations are going through?</p>
