Please see my comment to the question.
Use System.Timers.Timer
:
System.Timers.Timer[^].
Don't use System.DateTime
with the timer. Simply set the timer's Interval
property to 20 min.
[EDIT]
No, you need to use JavaScript timer. This should explain you what to do:
http://www.w3schools.com/js/js_timing.asp[
^].
I don't even what to explain and think about what happens if you use the timer on the server-side. Just understand that all what server side does is: it accepts HTTP request and generates HTTP response. This is all the whole runtime of an ASP.NET page. Analyze it, and you should understand why what you did makes no sense at all.
—SA