简体   繁体   中英

Calling Javascript from WCF Web Service

Is this even possible? Some post mentioned Signal R??

The only examples I have came across was calling Jscript from the code behind of an ASPX file using ScriptManager.RegisterStartupScript ???

Cheers

It is possible using SignalR, SignalR Hubs to be precise. Basically, it uses persistent web socket connection to communicate between clients and server. Thus, you can execute methods on server side (Hub) from JavaScript (you can pass parameters and get returned value) and vice versa.

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