(Suppose this is possible even in .Net, of course.)
Ultimately, I want to create an AJAX-based messaging system. I already have a database table for messages, and ASPX for adding new messages (and declaring old messages is no longer relevant).
The current messaging system checks the server every 15 seconds and re-dials the current set of messages.
What I want to do is: In $ (document) .ready () register an ajax callback function that listens for an event on the server side (for example, MessagesUpdated) On the insert / update table, fire MessagesUpdated server side.
Thus, whenever a table is updated (or new records are added), any clients listening will know that new data is available, and can resubmit the server.
Ideally, I would also like to make new data available as an argument to the event (to minimize re-polling db).
I can find links to something similar in other languages, but I can not find any real code examples to get started.
Assuming this is possible to do through .Net, can someone help me get started with this?
I am using the 2.0 Framework. Also, while I added the VB.Net tag, I can read C # quite well, so please feel free to post in any language.
Thanks in advance!
Pete
source share