473,378 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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
Nov 17 '05 #1
4 9099
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:
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:
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
http://Steve.Orr.net
"Stephajn Craig" <s.*****@NOSPAMfunsunvacations.com> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
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

Nov 17 '05 #2
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" <St***@Orr.net> wrote in message
news:Oj**************@TK2MSFTNGP09.phx.gbl...
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:
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:
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
http://Steve.Orr.net
"Stephajn Craig" <s.*****@NOSPAMfunsunvacations.com> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
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


Nov 17 '05 #3
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.*****@NOSPAMfunsunvacations.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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" <St***@Orr.net> wrote in message
news:Oj**************@TK2MSFTNGP09.phx.gbl...
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:
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:

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
http://Steve.Orr.net
"Stephajn Craig" <s.*****@NOSPAMfunsunvacations.com> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
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



Nov 17 '05 #4
Ram
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" <St***@Orr.net> wrote in message news:<Oz**************@TK2MSFTNGP10.phx.gbl>...
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.*****@NOSPAMfunsunvacations.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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" <St***@Orr.net> wrote in message
news:Oj**************@TK2MSFTNGP09.phx.gbl...
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:
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:

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
http://Steve.Orr.net
"Stephajn Craig" <s.*****@NOSPAMfunsunvacations.com> wrote in message
news:eb**************@TK2MSFTNGP12.phx.gbl...
> 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
>
>


Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jason . | last post by:
I have seen a few articles with a javascript example but it is not working for me. The server side code is processed first and then the javascript so I basically get my page loading splash screen...
3
by: Danny Masti | last post by:
Hello, I have a HIDDEN div with a "Please Wait Message". OnSubmit I show the hidden div with the "Please Wait Message". It works fine. But if I replace the "Please Wait Message" with an animated...
4
by: Dennis M. Marks | last post by:
I have multiple functions that dynamically build parts of a page. It can take 15-30 seconds for this process to complete. In IE nothing appears until the page is complete. In Netscape parts of the...
3
by: Lucas Tam | last post by:
Does anyone have easy to use sample code to build a "Please wait... processing data screen?" I'm interested in something like Expedia's search page Thanks. -- Lucas Tam...
5
by: Chris | last post by:
Hi, I was following the article http://msdn.microsoft.com/msdnmag/issues/03/12/DesignPatterns/default.aspx I got everything working until I go the the Progress bar section. Here is where I am...
2
by: s_erez | last post by:
Hi, This is a realy tricky one. I have an ASP.NET application where some pages are reading data from a DB and presenting reports. In order for the user to wait while the page is reading data from...
4
by: ~Maheshkumar.R | last post by:
hi groups, I have developed one FTP application in ASP.NET, When i upload a file, i want to show something on screen like " Please wait ...! Your file is being uploading........" As soon the file...
4
by: puja patel | last post by:
hi all, I am developing a shopping cart website in C# where after selecting item, user enters credit card details and click on submit button.This request is then processed by the gateway which...
5
by: Jeremy | last post by:
Hi all, I have database actions that will potentially take several seconds to complete. My normal page uses AJAX so keeping the user informed of what is happening is not a problem. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.