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 288739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:50:40+00:00 2026-05-12T05:50:40+00:00

I am building an ASP.NET site using Visual Studio 2008 and have a page

  • 0

I am building an ASP.NET site using Visual Studio 2008 and have a page looking like this (stuff snipped)

<asp:Content ID="Content2" ContentPlaceHolderID="PageContentPlaceHolder" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            the page here..
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="100">
        <ProgressTemplate>
            <div>
                <asp:Image ID="AjaxImage" runat="server" ImageUrl="Ajax.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>

The page_load starts a long (>5s) process

protected void Page_Load(object sender, EventArgs e)
{            
  if (!IsPostBack)            
  {
    LongRunningProcess();                
  }
}

How can I display the UpdateProgress while the LongRunningProcess is running? It does work when I move the LongRunningProcess() call to a button onclick handler.

  • 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-05-12T05:50:40+00:00Added an answer on May 12, 2026 at 5:50 am

    Create a normal div that shows the Ajax.gif so it shows “processing” by default.

    In the javascript pageLoad() function, make a call back to the page using Ajax’s PageMethods.

       function pageLoad(sender, args) {
                    PageMethods.getVersions(LoadVersionsCallback);
        }
    

    The method you are calling in your .aspx.cs file has to be static, it can take parameters and looks something like:

       [System.Web.Services.WebMethod]
        public static string getVersions()
        {
          StringBuilder sb = new StringBuilder();
           ... etc.
          return sb.ToString();
    
        }
    

    The javascript function that you specified when you called the method will run when the method completes. It will be passed the results. At the end of this function you hide the Ajax.gif div.

       function LoadVersionsCallback(result) {
        // do something with the results - I load a dropdown list box.
    
       ...etc. 
        // here is where you hide your div holding the Ajax.gif  
    
       }
    

    And then you work on making whatever it is you are doing run in less than 1 second….

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

Sidebar

Related Questions

I'm building an ASP.NET MVC site using the ADO.NET Entity Framework. I have an
I'm in the middle of building a pretty big site using asp.net (forms if
I am building an Asp.net MVC site where I have a fast dedicated server
I am building a site in asp.net and have multiple subdomains. For example, one.cookies.com
I am building an ASP.NET MVC application using the 1.0 release using Visual Web
I am currently building a simple ASP.NET MVC site using Linq to Entities. My
I'm building an ASP.NET MVC site where I'm using Lucene.Net for search queries. I
I am building my first ASP.NET MVC site and this site needs to be
Why must IE be so difficult? Building site on ASP.NET MVC platform. Email page
Hi, I am building a ASP.NET MVC site and have runned across a problem.

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.