开发者

How to Auto Update post without any page load in ASP.NET(Like Google+)?

开发者 https://www.devze.com 2023-04-04 05:45 出处:网络
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.

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 Messag开发者_开发技巧es 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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号