Search code examples
asp.netajaxtimerdelaydelayed-execution

How to call a function in ASP.NET automatically after a certain time has elapsed?


Let's say I have a Label on my page. In PageLoad() it's Text parameter is set to "This is my first text".

After, for example, 1 minute I want this Label to change it's text parameter to "This is my second text" (completely automatically, without any interaction of a user with this site).

Any ideas are welcome. AJAX perhaps? How? Thank you!


Solution

  • You could use a timer like this:

    http://dotnetperls.com/timer

    Similar question on an AJAX version:

    ASP.NET/AJAX - Timer not working correct