I've created a sample to give you some hint with C# in ASP.NET.
Basically, I create a Timer object and schedule it to get the current time of the server at 2-second interval. And that information is displayed on the page, together with the highlighted Global.asax.cs file source code.