I'm currently developing an application in ASP.NET using SQL as the backend database. In my header, I have a status bar that displays the current status of the user and a timer that shows how long they've been labeled as that status.
Using an update panel with a timer to refresh the data straight from the database (thus making 1 query/update each second) doesn't seem like the best way to go about this. I would assume you'd want to query the user's "start time" for their status and use a javascript timer to keep track from there, but my problem is this; how would I integrate this method while also making sure that the status itself is updated when it's changed in the database?