Implement a Please Wait Page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stephajn Craig

    #1

    Implement a Please Wait Page

    I have one page that may take a while to process on the server, and I'd like
    to implement a please wait message on this page when it posts back to the
    server and does its business.

    The page is an ASP.NET webform that contains a Web User Control. The Web
    User Control is doing all of the work posting. How can I inform the user of
    what is happening at the server while the data from this web user control is
    being processed?

    --
    Stephajn Craig


  • Steve C. Orr, MCSD

    #2
    Re: Implement a Please Wait Page

    It sounds like you should consider using multithreading.
    By running the long process on a separate thread, you free the browser up to
    do other things, such as display the current status of the task.
    That way the browser will respond immediately with a new page and can
    entertain the user while they wait with an animation or status bar.
    You can have the browser refresh the status by putting an HTML line like
    this in your code:
    <META HTTP-EQUIV="refresh" CONTENT="3">
    That will cause the browser to refresh every 3 seconds (and you can check
    the status of the operation each time and redirect to a "done" page when
    appropriate.)
    Here's more details:



    Another option is that you could call a web service from your client side
    JScript. Use the web service behavior for this. (WebService.htc ) This
    technique works with IE only.
    Here's more details:
    http://msdn.microsoft.com/library/de...s/overview.asp

    http://msdn.microsoft.com/downloads/...ce/default.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD



    "Stephajn Craig" <s.craig@NOSPAM funsunvacations .com> wrote in message
    news:ebSy$oiUDH A.1872@TK2MSFTN GP12.phx.gbl...[color=blue]
    > I have one page that may take a while to process on the server, and I'd[/color]
    like[color=blue]
    > to implement a please wait message on this page when it posts back to the
    > server and does its business.
    >
    > The page is an ASP.NET webform that contains a Web User Control. The Web
    > User Control is doing all of the work posting. How can I inform the user[/color]
    of[color=blue]
    > what is happening at the server while the data from this web user control[/color]
    is[color=blue]
    > being processed?
    >
    > --
    > Stephajn Craig
    >
    >[/color]


    Comment

    • Stephajn Craig

      #3
      Re: Implement a Please Wait Page

      Thanks Steve! Both of these methods helped. The only question is to decide
      which one to use. I like the Web Service method becasue it doesn't need a
      full refresh of the page. However, I also like the MultiThreaded Approach
      because it allows me to hold some items within the current HttpContext at
      Serverside. (Like a Collection)

      The scenario is that all of this data is going to be loaded into a database,
      but then also some checks will be done against it at serverside to ensure
      that no conflicts will occur. (Like one Person scheduled for a meeting
      isn't already scheduled for another)

      Once the data is done posting, the server would be holding a collection of
      issues that will need to be resolved or ignored if the user wishes it.

      Any ideas on which method you would use ?



      --
      Stephajn Craig
      "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message
      news:OjXY8xiUDH A.2368@TK2MSFTN GP09.phx.gbl...[color=blue]
      > It sounds like you should consider using multithreading.
      > By running the long process on a separate thread, you free the browser up[/color]
      to[color=blue]
      > do other things, such as display the current status of the task.
      > That way the browser will respond immediately with a new page and can
      > entertain the user while they wait with an animation or status bar.
      > You can have the browser refresh the status by putting an HTML line like
      > this in your code:
      > <META HTTP-EQUIV="refresh" CONTENT="3">
      > That will cause the browser to refresh every 3 seconds (and you can check
      > the status of the operation each time and redirect to a "done" page when
      > appropriate.)
      > Here's more details:
      > http://www.fawcette.com/vsm/2002_11/...tures/chester/
      > http://www.dotnetjunkies.com/tutoria...tutorialid=547
      >
      > Another option is that you could call a web service from your client side
      > JScript. Use the web service behavior for this. (WebService.htc ) This
      > technique works with IE only.
      > Here's more details:
      >[/color]
      http://msdn.microsoft.com/library/de...s/overview.asp[color=blue]
      >
      >[/color]
      http://msdn.microsoft.com/downloads/...ce/default.asp[color=blue]
      >
      > --
      > I hope this helps,
      > Steve C. Orr, MCSD
      > http://Steve.Orr.net
      >
      >
      > "Stephajn Craig" <s.craig@NOSPAM funsunvacations .com> wrote in message
      > news:ebSy$oiUDH A.1872@TK2MSFTN GP12.phx.gbl...[color=green]
      > > I have one page that may take a while to process on the server, and I'd[/color]
      > like[color=green]
      > > to implement a please wait message on this page when it posts back to[/color][/color]
      the[color=blue][color=green]
      > > server and does its business.
      > >
      > > The page is an ASP.NET webform that contains a Web User Control. The[/color][/color]
      Web[color=blue][color=green]
      > > User Control is doing all of the work posting. How can I inform the[/color][/color]
      user[color=blue]
      > of[color=green]
      > > what is happening at the server while the data from this web user[/color][/color]
      control[color=blue]
      > is[color=green]
      > > being processed?
      > >
      > > --
      > > Stephajn Craig
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Steve C. Orr, MCSD

        #4
        Re: Implement a Please Wait Page

        Well the web services strategy probably wouldn't work as well in a
        cross-browser environment.
        So if you have cross-browser requirements then that makes your decision
        easy.

        Expedia employs a multithreaded approach similar to what I described and it
        looks pretty sharp. Look up a flight and see what I mean.

        --
        I hope this helps,
        Steve C. Orr, MCSD



        "Stephajn Craig" <s.craig@NOSPAM funsunvacations .com> wrote in message
        news:%23Zkg8SjU DHA.1280@tk2msf tngp13.phx.gbl. ..[color=blue]
        > Thanks Steve! Both of these methods helped. The only question is to[/color]
        decide[color=blue]
        > which one to use. I like the Web Service method becasue it doesn't need a
        > full refresh of the page. However, I also like the MultiThreaded Approach
        > because it allows me to hold some items within the current HttpContext at
        > Serverside. (Like a Collection)
        >
        > The scenario is that all of this data is going to be loaded into a[/color]
        database,[color=blue]
        > but then also some checks will be done against it at serverside to ensure
        > that no conflicts will occur. (Like one Person scheduled for a meeting
        > isn't already scheduled for another)
        >
        > Once the data is done posting, the server would be holding a collection of
        > issues that will need to be resolved or ignored if the user wishes it.
        >
        > Any ideas on which method you would use ?
        >
        >
        >
        > --
        > Stephajn Craig
        > "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message
        > news:OjXY8xiUDH A.2368@TK2MSFTN GP09.phx.gbl...[color=green]
        > > It sounds like you should consider using multithreading.
        > > By running the long process on a separate thread, you free the browser[/color][/color]
        up[color=blue]
        > to[color=green]
        > > do other things, such as display the current status of the task.
        > > That way the browser will respond immediately with a new page and can
        > > entertain the user while they wait with an animation or status bar.
        > > You can have the browser refresh the status by putting an HTML line like
        > > this in your code:
        > > <META HTTP-EQUIV="refresh" CONTENT="3">
        > > That will cause the browser to refresh every 3 seconds (and you can[/color][/color]
        check[color=blue][color=green]
        > > the status of the operation each time and redirect to a "done" page when
        > > appropriate.)
        > > Here's more details:
        > > http://www.fawcette.com/vsm/2002_11/...tures/chester/
        > > http://www.dotnetjunkies.com/tutoria...tutorialid=547
        > >
        > > Another option is that you could call a web service from your client[/color][/color]
        side[color=blue][color=green]
        > > JScript. Use the web service behavior for this. (WebService.htc ) This
        > > technique works with IE only.
        > > Here's more details:
        > >[/color]
        >[/color]
        http://msdn.microsoft.com/library/de...s/overview.asp[color=blue][color=green]
        > >
        > >[/color]
        >[/color]
        http://msdn.microsoft.com/downloads/...ce/default.asp[color=blue][color=green]
        > >
        > > --
        > > I hope this helps,
        > > Steve C. Orr, MCSD
        > > http://Steve.Orr.net
        > >
        > >
        > > "Stephajn Craig" <s.craig@NOSPAM funsunvacations .com> wrote in message
        > > news:ebSy$oiUDH A.1872@TK2MSFTN GP12.phx.gbl...[color=darkred]
        > > > I have one page that may take a while to process on the server, and[/color][/color][/color]
        I'd[color=blue][color=green]
        > > like[color=darkred]
        > > > to implement a please wait message on this page when it posts back to[/color][/color]
        > the[color=green][color=darkred]
        > > > server and does its business.
        > > >
        > > > The page is an ASP.NET webform that contains a Web User Control. The[/color][/color]
        > Web[color=green][color=darkred]
        > > > User Control is doing all of the work posting. How can I inform the[/color][/color]
        > user[color=green]
        > > of[color=darkred]
        > > > what is happening at the server while the data from this web user[/color][/color]
        > control[color=green]
        > > is[color=darkred]
        > > > being processed?
        > > >
        > > > --
        > > > Stephajn Craig
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Ram

          #5
          Re: Implement a Please Wait Page

          If you just want to display a simple message like "Please wait
          loading...it may take few minutes..", you can do that using layers.

          Create a DIV tag for the complete page size and have an animated image
          in it to show that the page is loading. On the page load hide this
          layer and on unload of the page bring it to the top(z-index) and show
          it. If you use smart navigation, this page will be shown until your
          long reaquest gets completed and displayed in the browser.

          I did this in one of my projects and my queries may run longer than
          six minutes. It is working fine and is in production.

          Thanks
          Ram

          "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message news:<Ozvz$YjUD HA.2164@TK2MSFT NGP10.phx.gbl>. ..[color=blue]
          > Well the web services strategy probably wouldn't work as well in a
          > cross-browser environment.
          > So if you have cross-browser requirements then that makes your decision
          > easy.
          >
          > Expedia employs a multithreaded approach similar to what I described and it
          > looks pretty sharp. Look up a flight and see what I mean.
          >
          > --
          > I hope this helps,
          > Steve C. Orr, MCSD
          > http://Steve.Orr.net
          >
          >
          > "Stephajn Craig" <s.craig@NOSPAM funsunvacations .com> wrote in message
          > news:%23Zkg8SjU DHA.1280@tk2msf tngp13.phx.gbl. ..[color=green]
          > > Thanks Steve! Both of these methods helped. The only question is to[/color]
          > decide[color=green]
          > > which one to use. I like the Web Service method becasue it doesn't need a
          > > full refresh of the page. However, I also like the MultiThreaded Approach
          > > because it allows me to hold some items within the current HttpContext at
          > > Serverside. (Like a Collection)
          > >
          > > The scenario is that all of this data is going to be loaded into a[/color]
          > database,[color=green]
          > > but then also some checks will be done against it at serverside to ensure
          > > that no conflicts will occur. (Like one Person scheduled for a meeting
          > > isn't already scheduled for another)
          > >
          > > Once the data is done posting, the server would be holding a collection of
          > > issues that will need to be resolved or ignored if the user wishes it.
          > >
          > > Any ideas on which method you would use ?
          > >
          > >
          > >
          > > --
          > > Stephajn Craig
          > > "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message
          > > news:OjXY8xiUDH A.2368@TK2MSFTN GP09.phx.gbl...[color=darkred]
          > > > It sounds like you should consider using multithreading.
          > > > By running the long process on a separate thread, you free the browser[/color][/color]
          > up
          > to[color=green][color=darkred]
          > > > do other things, such as display the current status of the task.
          > > > That way the browser will respond immediately with a new page and can
          > > > entertain the user while they wait with an animation or status bar.
          > > > You can have the browser refresh the status by putting an HTML line like
          > > > this in your code:
          > > > <META HTTP-EQUIV="refresh" CONTENT="3">
          > > > That will cause the browser to refresh every 3 seconds (and you can[/color][/color]
          > check[color=green][color=darkred]
          > > > the status of the operation each time and redirect to a "done" page when
          > > > appropriate.)
          > > > Here's more details:
          > > > http://www.fawcette.com/vsm/2002_11/...tures/chester/
          > > > http://www.dotnetjunkies.com/tutoria...tutorialid=547
          > > >
          > > > Another option is that you could call a web service from your client[/color][/color]
          > side[color=green][color=darkred]
          > > > JScript. Use the web service behavior for this. (WebService.htc ) This
          > > > technique works with IE only.
          > > > Here's more details:
          > > >[/color]
          > >[/color]
          > http://msdn.microsoft.com/library/de...s/overview.asp[color=green][color=darkred]
          > > >
          > > >[/color]
          > >[/color]
          > http://msdn.microsoft.com/downloads/...ce/default.asp[color=green][color=darkred]
          > > >
          > > > --
          > > > I hope this helps,
          > > > Steve C. Orr, MCSD
          > > > http://Steve.Orr.net
          > > >
          > > >
          > > > "Stephajn Craig" <s.craig@NOSPAM funsunvacations .com> wrote in message
          > > > news:ebSy$oiUDH A.1872@TK2MSFTN GP12.phx.gbl...
          > > > > I have one page that may take a while to process on the server, and[/color][/color]
          > I'd
          > like[color=green][color=darkred]
          > > > > to implement a please wait message on this page when it posts back to[/color][/color]
          > the[color=green][color=darkred]
          > > > > server and does its business.
          > > > >
          > > > > The page is an ASP.NET webform that contains a Web User Control. The[/color][/color]
          > Web[color=green][color=darkred]
          > > > > User Control is doing all of the work posting. How can I inform the[/color][/color]
          > user
          > of[color=green][color=darkred]
          > > > > what is happening at the server while the data from this web user[/color][/color]
          > control
          > is[color=green][color=darkred]
          > > > > being processed?
          > > > >
          > > > > --
          > > > > Stephajn Craig
          > > > >
          > > > >
          > > >
          > > >[/color]
          > >
          > >[/color][/color]

          Comment

          Working...