Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
How to display page while long-running process executing?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Steven Cheng[MSFT], post: 2758954"] 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 [URL]http://msdn2.microsoft.com/en-us/library/ms979200.aspx[/URL] #Building a Better Wait Page [URL]http://www.codeproject.com/aspnet/wait_page.asp[/URL] #Solve the Page Waiting Game with Threaded AJAX [URL]http://www.devx.com/asp/Article/29617[/URL] 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 [URL]http://ajax.asp.net/docs/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx[/URL] #ASP.NET AJAX Roadmap [URL]http://ajax.asp.net/docs/default.aspx[/URL] 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 [URL]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif[/URL] 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 [URL]http://msdn.microsoft.com/subscriptions/support/default.aspx[/URL]. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
How to display page while long-running process executing?
Top