I have a control application – using asp.net webservices.
I have a timer which does an asynchronous webservice call every 5 seconds to update the screen.There are also user buttons to refresh parts of the screen, also doing async webservice calls.
The issue is my screen get messy if a user webservice command is issued before the timer webservice response has arrived. Basically, I want the user command to wait, if there is a pending async timer call in process. How do I synchronize between these calls in Javascript?
Thanks.
Is it possible to ignore the timed postback when a user postback occurs?
If so, set 2 flags (DontRequest and IgnoreNext) when the user does postback. When the user postback returns, unset DontRequest.
Your automated process would not start requests while DontRequest is set. If a response is received and IgnoreNext is set, ignore the response and unset the flag.