Any elegant way of doing this?

Discussion in 'ASP .Net' started by Morten Wennevik, Nov 8, 2005.

  1. Hi,

    Upon clicking a button I perform some heavy server side calculations lasting up to five minutes. During this time, the web page appear to be loading the response page.

    Is there some elegant way to show progress to the user? The server side calculations are done in four separate methods. I imagine the user might be interested in knowing when one method is done and the next is running.

    Javascript and threading?

    Morten
     
    Morten Wennevik, Nov 8, 2005
    #1
    1. Advertising

  2. Do a search on "Wait Message" and you should get plenty of hits...
    Typically what you do is a Response.Flush() to force what you have to the
    screen (I usually use a animated GIF) and then the page will continue to
    process.
    If your code takes 5 min to execute you may want to kick it off
    independantly though, and let the user continue on and check back later for
    the results.

    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com



    "Morten Wennevik" wrote:

    >
    > Hi,
    >
    > Upon clicking a button I perform some heavy server side calculations lasting up to five minutes. During this time, the web page appear to be loading the response page.
    >
    > Is there some elegant way to show progress to the user? The server side calculations are done in four separate methods. I imagine the user might be interested in knowing when one method is done and the next is running.
    >
    > Javascript and threading?
    >
    > Morten
    >
     
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=, Nov 8, 2005
    #2
    1. Advertising

  3. Morten,

    I feel that you'll need to make a tradeoff somewhere between
    elegance+simplicity and accuracy+load. Your first option is to create a
    real simple PLEASE WAIT page with some details on it and the time it might
    take.

    But if you want the user to know what's going on when, then you can use
    Resonse.Flush()es to write chunks of text to the browser indicating the
    processes that have been performed. (Look at www.wwhois.com to see what I
    mean)

    And yet another option would be to use XMLHTTP to perform requests to the
    page with your 4 operations, and updating content in your calling page as
    and when a process is complete.

    The last two methods can prove to be 'heavy' on the server, and if you have
    a *LOT* of visitors on your site, then you shouldn't consider it. Else,
    have fun implementing it.

    HTH
    Altaf

    --------------------------------------------------------------------------------
    All that glitters has a high refractive index.
    www.mendhak.com

    "Morten Wennevik" <> wrote in message
    news:eek:...
    >
    > Hi,
    >
    > Upon clicking a button I perform some heavy server side calculations
    > lasting up to five minutes. During this time, the web page appear to be
    > loading the response page.
    >
    > Is there some elegant way to show progress to the user? The server side
    > calculations are done in four separate methods. I imagine the user might
    > be interested in knowing when one method is done and the next is running.
    >
    > Javascript and threading?
    >
    > Morten
     
    S.M. Altaf [MVP], Nov 8, 2005
    #3
  4. On Tue, 08 Nov 2005 14:54:04 +0100, Curt_C [MVP] <software_at_darkfalz.com> wrote:

    > Do a search on "Wait Message" and you should get plenty of hits...
    > Typically what you do is a Response.Flush() to force what you have to the
    > screen (I usually use a animated GIF) and then the page will continue to
    > process.
    > If your code takes 5 min to execute you may want to kick it off
    > independantly though, and let the user continue on and check back later for
    > the results.
    >



    Thanks, I'll look into it
     
    Morten Wennevik, Nov 8, 2005
    #4
  5. Thanks, I'll look into it

    On Tue, 08 Nov 2005 15:03:25 +0100, S.M. Altaf [MVP] <> wrote:

    > Morten,
    >
    > I feel that you'll need to make a tradeoff somewhere between
    > elegance+simplicity and accuracy+load. Your first option is to create a
    > real simple PLEASE WAIT page with some details on it and the time it might
    > take.
    >
    > But if you want the user to know what's going on when, then you can use
    > Resonse.Flush()es to write chunks of text to the browser indicating the
    > processes that have been performed. (Look at www.wwhois.com to see what I
    > mean)
    >
    > And yet another option would be to use XMLHTTP to perform requests to the
    > page with your 4 operations, and updating content in your calling page as
    > and when a process is complete.
    >
    > The last two methods can prove to be 'heavy' on the server, and if you have
    > a *LOT* of visitors on your site, then you shouldn't consider it. Else,
    > have fun implementing it.
    >
    > HTH
    > Altaf
    >
    > --------------------------------------------------------------------------------
    > All that glitters has a high refractive index.
    > www.mendhak.com
    >
    > "Morten Wennevik" <> wrote in message
    > news:eek:...
    >>
    >> Hi,
    >>
    >> Upon clicking a button I perform some heavy server side calculations
    >> lasting up to five minutes. During this time, the web page appear to be
    >> loading the response page.
    >>
    >> Is there some elegant way to show progress to the user? The server side
    >> calculations are done in four separate methods. I imagine the user might
    >> be interested in knowing when one method is done and the next is running.
    >>
    >> Javascript and threading?
    >>
    >> Morten

    >
    >
    >
     
    Morten Wennevik, Nov 8, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. P L

    Any elegant way to do this?

    P L, Oct 17, 2003, in forum: C Programming
    Replies:
    1
    Views:
    355
    Mark A. Odell
    Oct 17, 2003
  2. Replies:
    5
    Views:
    423
    Steven Bethard
    Mar 3, 2006
  3. Licheng Fang
    Replies:
    5
    Views:
    436
    =?ISO-8859-15?Q?Juli=E1n?= Albo
    Sep 23, 2006
  4. Alex Buell

    What's the most elegant way of doing this?

    Alex Buell, Feb 3, 2009, in forum: C Programming
    Replies:
    3
    Views:
    344
    Alex Buell
    Feb 4, 2009
  5. Paul Miller
    Replies:
    6
    Views:
    349
    Malte Helmert
    Nov 24, 2009
Loading...

Share This Page