Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9202451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:15:42+00:00 2026-06-17T23:15:42+00:00

I am making a web app in asp.net using c# that collects a lot

  • 0

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.

To make this happen on one page, I have a div called loadingdiv for which I set the Visible property of to false during PageLoad. 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.

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 loadingdiv.Visible = true line and just does the 10-20 second operation.

Here’s the relevant lines of 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<int> gList = new List<int>(); //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
}

How can I get the loadingdiv to show up while my web service operations are going through?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:15:44+00:00Added an answer on June 17, 2026 at 11:15 pm

    Everything in that method happens before any response is served to the user. This means that the following happens:

    • The user clicks your button.
    • A request is sent to the server and a postback occurs.
    • During the postback, btnFindMovies_Click is fired. You set Visible = true, wait for the web services to return their information and then set Visible = false.
    • The response is served to the browser.

    Because this is all done on the same request, nothing is returned to the browser until all of this is done, which effectively eliminates the loadingdiv.Visible = true; line entirely.

    If you want a loading div to show while some server-side code issues requests to web services, you will have to use AJAX to make these calls asynchronously and use Javascript to hide/show the loading div accordingly.

    The following looks like a useful introductory guide to AJAX:

    http://www.simple-talk.com/dotnet/asp.net/ajax-basics-with-jquery-in-asp.net/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a web app in Asp.Net using c# that lets you add items
I've got a web app in asp.net that uses an Infragistics control for making
I am making a web app, using ASP.NET. Basically, I need to display data
we are making an web application using some big asp.net web toolkit. At the
I'm making an ASP.NET web forms web app. I've just started with the client
We have an asp.net 3.5 web app that we must start load testing with
I was making a web app to deploy using Heroku.com when I realized that
I'm just learning ASP.net and also making a web app for a friend in
I'm working on an asp.net app that is utilizing a lot of jQuery UI
I'm making a web-app with PhoneGap. Here's my current hurdle: On page one, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.