Execute method in global.asax every few minutes

前端 未结 3 1629
抹茶落季
抹茶落季 2020-12-21 04:29

What is the most effective way to execute a method in the Global.asax file every x number of minutes? Is there a way to have the ASP.NET server run a background thread that

3条回答
  •  没有蜡笔的小新
    2020-12-21 05:03

    you could use combination of HTTPModule and ASP.NET TIMER to do this

    http://technico.qnownow.com/2012/04/06/create-custom-http-module-to-periodically-refresh-cache-or-some-other-work/

    (or)

    You could use AJAX Timer control .

    http://technico.qnownow.com/2012/06/12/refresh-gridview-intervals-using-ajax-timer/

提交回复
热议问题