Re: How to display page while long-running process executing?



Hello lmttag,

Regarding on such waring page for longrun task, in ASP.NET, we have the
following approachs so far:

1. Start the server-side long run task in a certain postback event, and
then in client-side page, use script (or html <meta> tag) to constantly
postback the page to check for the server-side task status(use session
variable ). If the task finished, stop those constantly postback script and
display final result.

2. During the time without ajax, we have the option to use some client-side
XMLHttp post component to send http request to server-side(to poll status
of the server-side long run task). This way, we can avoid constantly
refreshing the web page(as #1 does).

here are some web articles introduced some of such approaches:

#How To: Submit and Poll for Long-Running Tasks
http://msdn2.microsoft.com/en-us/library/ms979200.aspx

#Building a Better Wait Page
http://www.codeproject.com/aspnet/wait_page.asp

#Solve the Page Waiting Game with Threaded AJAX
http://www.devx.com/asp/Article/29617




3. Nowadays, we have the AJAX based pattern, it is somewhat like the #2,
but leverage existing ajax components. The microsoft AJAX framework just
provide such a well encapsulated AJAX framework that can help us build AJAX
web application. Here for long run task, you can start it in a certain
postback event, and then let the client-side call a AJAX webservice
function to constantly poll the status of the server-side task.

Here are reference about calling webservice in ASP.NET ajax application(and
the whole tutorial):


#Calling Web Services from Client Script in ASP.NET AJAX
http://ajax.asp.net/docs/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx

#ASP.NET AJAX Roadmap
http://ajax.asp.net/docs/default.aspx

Hope this helps. if you have any more specific questions, welcome to
discuss here also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • RE: Ajax and IE crash
    ... If you click on the link on the default page, it opens a new window/tab. ... Microsoft Online Support ... | Thread-Topic: Ajax and IE crash ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Ajax and IE crash
    ... I look forward to your demo project and will test on it. ... Microsoft Online Support ... | Thread-Topic: Ajax and IE crash ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Ajax and IE crash
    ... I am loading 11 drop down lists using the toolkit's Cascading Drop Down. ... Do you mean if AJAX toolkit is used, sometimes when you close the browser ... Microsoft Online Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Ajax on Windows Mobile 6
    ... Microsoft Online Support ... where an initial response from the community or a Microsoft Support ... Ajax on Windows Mobile 6 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: advanced question: feasability of using delegates on original obje
    ... Even as the old-school postback does, all these AJAX ... frameworks recreate any associated objects for each call to a server-side ... --(from within a web control) ... But there's one problem - delegate accumulation. ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast