简体   繁体   中英

Server initiate client response in ASP.NET

I have a ASP.NET application that has a form, which sends its information to be processed by the backend server. The server though will sometimes need to send information back the frontend client page for confirmation. I want the server thread to sit and wait for the clients response, and then continue when confirmation is received from the client.

I've looked into using ICallbackEventHandler but it won't keep the session like I need with my current design.

Any thoughts on how I need to adjust the design or implement what I am looking for?

Thanks.

如果要避免进行完整的回发,可以使用SignalR之类的技术从服务器上调用客户端上的javascript方法。

You can use Ajax Developpement , for example you can use UpdatePanel control based on Triggers

Link : http://msdn.microsoft.com/fr-fr/library/system.web.ui.updatepanel.aspx

In your specific case you can use Update Method

LInk : http://msdn.microsoft.com/fr-fr/library/system.web.ui.updatepanel.update.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM