Is it possible to subscribe to c# event with JavaScript?
<p>I'm working on a web application that needs to frequently poll the server database and check for any available data to the client.</p>

<p>Ideally, I would need to be able get a javascript function callback in the server, in order to be able to call the javascript function back whenever any new data is available on the database, instead of having to poll the server every 5 seconds.</p>

<p>Simplifying, I would need to be able to call a method in the server and pass a js function as a parameter for callback. I want to avoid the overhead of polling the server repeatedly.</p>

<p>Is there any way this could be possibly done with asp.net and ajax?</p>
