Reputation: 77
I have to program a chat with asp.net.
The messages are saved in a SQL Server database.
How can I retrieve the messages from the database in real time?
If an other user write a message, how can I know it?
I saw something about SqlCacheDependency
polling and pushing, but I don't want to always refresh the page. It's maybe better to use SqlDependency
, or maybe ajax?
Do you have some idea?
Somebody has some code example?
Upvotes: 2
Views: 3474
Reputation: 4169
Please try this, it's best framework to do real time chat's
http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr
Upvotes: 2