RE: ATL SERVER QUESTION
by stcheng » Wed, 08 Nov 2006 17:24:55 GMT
ello Retf,
From your description, you're developing an web application through ATL
Server. There is one page which provide a link and the user click it to
start a server-side processing. You want to redirect the user to another
waiting page during the processing and return to original page after the
server-processing finished, correct? If anything I missed, please let me
know.
Based on my experience, in html page based web applications, generally we
have the following options to do such task:
1.when the user click link to post the page, our processing begin at
server(maybe in a backgroun thread), then you directly return some client
script to redirect to the waiting page. In the waiting page, you can use a
iframe(point to another page) to contantly postback to server and query the
status of the server-side process(maybe through a sessionstate variable).
When the task is finished the iframe page can output some script to
redirect the parent page(waiting page) to the original page.
2.Actually, you can also consider use some AJAX script code to poll status
from server without postback the page(use some XMLhttp component in client
script). In such case, what you need to do is as below:
** when user click link in page1, it start processing at server-side, and
redirect to a page(waiting page)
** in this waiting page, it has cilent-script(AJAX) that will constantly
send request to server to poll the processing status. You need to define a
server-side handler that will accept such client request(send through
XMLHTTP component in client) and return the task status).
** when the returned result indicate that the server-side processing has
finished, you simply redirect back the page to original page1
Here are some web article discussing on use ajax script or html <iframe> to
refresh page or query server-side status. Most of them may involve ASP.NET
or other server-side code logic ,however, the technique is neutural to
common web page development.
#How To: Submit and Poll for Long-Running Tasks
http://msdn2.microsoft.com/en-us/library/ms979200.aspx
#Refresh Portion Of Your Web Page Using XMLHTTP
http://www.codeproject.com/jscript/refreshpartweb.asp?df=100&forumid=2172&ex
p=0&select=31537
nj
http://www.frontpagewebmaster.com/m-116141/tm.htm
Hope this helps.
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.
========================================