Hi,
The problem with ASP.NET is when a "In Progress page" is displayed, the
HttpContext already end response, i.e., all information are sent to the
client. So when a callback returns, nothing more can be written to the
client's browser. And if I do a redirect, it result an error because
the code behind class doesn't know which browser it should communicate
to (because it ended response to the browser thus the client browser is
in a "disconnected" state).
I can think of two ways to do this.
1. Use JavaScript.
Have a timed redirect script inject to the "In Progress page." When
times up, the page redirects to the result page and if the result is
not ready, it goes back to the "In progress page" and wait again until
the result is ready (or timeout). The problem of this is the timed
parameter is fixed because you don't know in real time how long will
the web service take to return your call. So in the worst case it takes
twice as long to get the result (of course, this can be reduced but
it's kind of like a passive fix to the problem).
2. Tell the "In progress page" to send part of the page to the client
browser while waiting for the result. This would be ideal but I don't
know how to do it.
I don't have much problem dealing with async call directly, but how the
Page and the Client browser interact to get the solution works.
The solution I want is like the bank websites that after you login, it
display a page saying "We are gathering your information..." and then
direct you to summary page of your bank account.
Thanks,
Homa Wong
DotNetJerome wrote:
Hi,
The Following link may help you to understand beeterly about the
waithandle. I hope you can make you of this, to display the "In Process Page"
during your async call.
Cheers,
Jerome. M
"Homa" wrote:
Hi all,
Can anyone give me some links about how to do an async web service
call from aspx and display a temperary page before the web service
returns?
Thanks,
Homa Wong