#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Mar 2004
    Posts
    5
    Rep Power
    0

    Display Loading Message for server intense pages


    I am working on a web application using asp.NET/C#. There are alot of pages that can take quite a while to be displayed due to large amounts of data. I currently have a "page loading..." message that is displayed to the user using a combination of DHTML and Response.Flush() to push the data as needed to the client. However, this does not seam to work as good as I would like. There appears to be a considerable lag from the time the user clicks the link in the nav, and the browser finally displays the loading message. Here is a digested form of the code I am using now...

    ----------------------------------------------------------------------------
    ....private void Page_Load(object sender, System.EventArgs e)
    {
    Response.Buffer = true;


    labelLaodMsg.Text = "<div id='loadingMsg'>loading</div>"

    // flush the server cache to the browser will display the div
    Response.Flush();

    ------ Some server intensive code here -----


    //javascript to hide the load message
    labelJS.Text = "<script>bla bla</script>


    Response.Flush();
    }
    ----------------------------------------------------------------------------


    Is there a better place to put all of this rather than in the Page_Load? I would like the message to be displayed almost instantly after the user clicks the nav. Right now I have a feeling the server is building the page, and then sending the data to the client whenever it Flush is called. I would like the server to send the message, and THEN build the page. Also, if it helps, the pages that need the loading message are displayed within an IFrame.

    Thanks for any help.
  2. #2
  3. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Mar 2004
    Posts
    5
    Rep Power
    0
    gotta bump just this once.....

Similar Threads

  1. ASP Pages are not loading - blank
    By NeedHelpProgram in forum ASP Development
    Replies: 1
    Last Post: February 25th, 2004, 03:00 PM
  2. Session timout - display a friendly message
    By reedy in forum ASP Development
    Replies: 0
    Last Post: November 24th, 2003, 06:54 PM
  3. How to display a "please wait..." message
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: September 7th, 2001, 08:56 AM
  4. loading pages with frames
    By Steve Schofield in forum ASP Development
    Replies: 0
    Last Post: September 21st, 2000, 06:08 PM
  5. display records on different pages
    By Steve Schofield in forum ASP Development
    Replies: 1
    Last Post: July 27th, 2000, 01:39 PM

IMN logo majestic logo threadwatch logo seochat tools logo