Вопрос

I am developing a web application like facebook News feed or Google + Stream page. I am using ASP.NET , Telerik Rad Ajax control and Azure Cloud service.
For Example: I have 2 User: User1 and User2. User1 and User2 both are online and the same page is open in different PC. When User 1 Share (Post) a Messages then how to update the page of User2 without any page reload(Like Google+)?

Thanks Nahid

Это было полезно?

Решение

you want to do some long-polling. BAsically you fire off a request through ajax, that request is handed off to a seperate thread, which waits for an answer, before returning the request.

There's an example of a chat using long-polling here:

http://blogs.claritycon.com/blog/2011/04/12/roll-your-own-mvc-3-long-polling-chat-site/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top