how to do a server push

D

DesignerX

At a certain page in my web app I'm entering users into a Queue for
processing, how can I do a server push (like the expedia 'searching for
flights' screen) that can display a progress page then update when the
users.

Note: I'm not interested in client refresh.

Thanks,

Stan
 
A

Alex K

if you what to get data from server with out refresh
you can create web service and call from javascript

example
you can dounload webservice.htc from microsoft


<script language="javascript">
<!--
function init()
{
service1.useService("../Utill/SendEmailRemotly.asmx?WSDL","Send_Email");
}
//________
function getResultFromWebService(result){
alert(result.value);
}
//________
function GetId(sender, args){
var invalue=args.Value;
var funid;
funid =
service1.Send_Email.callService(getResultFromWebService,"SendEmail",invalue)
args.IsValid = true;
}
//-->
</script>
</HEAD>
<body onload="init()">
<div id="service1" style="BEHAVIOR:url(webservice.htc)"></div>
<form id="Form1" method="post" runat="server">
<asp:TextBox ID="txtEmailAddress" Runat="server"></asp:TextBox>&nbsp;
<asp:CustomValidator id="CV1" runat="server"
ControlToValidate="txtEmailAddress"
ClientValidationFunction="GetId"></asp:CustomValidator>&nbsp;
<input type="text">
</form>
</body>
</HTML>
 
S

Steve C. Orr, MCSD

Justin is correct.
The link he supplied shows a technique very similar to how Expedia works
(BTW, it uses a client refresh,) so that's likely what you'll want to
explore.

Another option is that you could periodocially call a web service from your
client side JScript to see if the processing is complete. You'd need a
client side timer for this. You'll also likely need to use the web service
behavior. (WebService.htc) This technique works with IE only.
Here's more details:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/behaviors/overview.asp

http://msdn.microsoft.com/downloads...rnet/behaviors/library/webservice/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top