0

Currently I make an ajax request (every interval) from a view to get a response from a controller and update view element accordingly. Is there a way to FLIP it other way around? That is to have the listener on the View and controller would fire an event to update the view?. any examples greatly appreciated. thanks

4

2 に答える 2

0

Sure, see SignalR https://github.com/SignalR/SignalR This is a pretty cool project that allows the server side pushes.

You could also investigate WebSockets, which SignalR didn't use as it was prior to WS, however I think its being rewritten (if not already) to use WebSockets as they are now standard.

于 2012-11-08T15:56:06.333 に答える
0

Check out XSockets.NET.

You can easily push data from a controller to your view. It uses websockets and supports .NET 4. I can provide you with examples if you need, but there are a few witten on git enter link description here

If you need more examples I can add one on git tomorrow.

Regards Uffe

于 2012-11-08T18:54:20.477 に答える