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

  • Home
  • SEARCH
  • 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 133495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:26:34+00:00 2026-05-11T06:26:34+00:00

I’m using ASP.NET and C# and am exporting a very large results set to

  • 0

I’m using ASP.NET and C# and am exporting a very large results set to Excel. While my export code is running I would like to show a ‘loading’ animated gif so the users will know their request is processing. I’ve been trying to do this with multithreading, but I am not very familiar with it. Can anyone guide me in the right direction? Thanks!

Jon

  • 1 1 Answer
  • 7 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. 2026-05-11T06:26:35+00:00Added an answer on May 11, 2026 at 6:26 am

    Are you trying to do multi-threading on the server? What I’d recommend is in your client side javascript turn on a please wait message before posting to the server. Then on the client side when your done posting you turn the message off.

    Without knowing more about your actual setup I can’t help much further, but last time I implemented this I did something along these lines:

    Assume we have a div called PrintLoadingPanel using JQUERY I set the div to display and take over the window:

        $('#printLoadingPanel')        .css({display:'block',top:'0px',left:'0px',height:screen.availHeight}); 

    I then will start a timer with a 1/2 second interval which will start checking if we are done printing. I’m only generating and downloading small PDF’s so i needed a quicker response. If your report is really slow you might want to tweak this:

        window.setTimeout(checkIfDoneDownload,500); 

    Then my CheckIfDoneDownload function hits the server and checks if we finished generating the file and downloaded it. I am using JQUERY here again to call an AJAX enabled WCF service. You could substitute this with PageMethods or any other way to callback to the server.

    function checkIfDoneDownload() {  $.ajax({   type: 'POST',   url: '../Services/Utilities.svc/IsPrintDownloadDone',   data: '{}',   contentType: 'application/json; charset=utf-8',   dataType: 'json',   success: function(msg) {   if (msg.d)   {     $('#printLoadingPanel').css('display','none');   }   else  {window.setTimeout(checkIfDoneDownload,500);}   },     error: function (xhr, textStatus, errorThrown) {   if (xhr.status==12030) {checkIfDoneDownload();} } }); } 

    Now on the server side, I am generating my downloads via an HTTP Handler. Essentially the first thing it does is set a session level flag to false, then the last thing it does is set it back to true. My check if done service just returns the value of the flag.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I would like to run a str_replace or preg_replace which looks for certain words

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.