Click here to Skip to main content
15,894,254 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi How can I run the script in Asp.Net after certain period of time ,for example ,every 15 minutes to do certain tasks.
What is the best way ?
Any Idea ,I would really appreciate.
Posted
Comments
kishore sharma 20-Aug-13 1:09am    
use ajax timer. in master page
sri senthil kumar 20-Aug-13 3:21am    
Are you speaking about javaScript to run on asp.net? if so simple "setTimeout()" will do.
Alireza_1362 20-Aug-13 3:27am    
no actually ,I want to do that with asp.net code behind ,suppose I want to send request to my generic handler (.ashx) after certain amount of time (every 15 minutes)and get some information ,how can I do that with server side code.
sri senthil kumar 20-Aug-13 3:53am    
As kishore sharma u can use timer control, but even that will create some js in background. Once page is rendered again if we want to intiate a server method, we need some trigger from client side I hope.
BulletVictim 20-Aug-13 4:23am    
Well it depends on if you want to reload the entire page or only, for instance, refresh the control on the page.
If you do not mind reloading the page have a look at this link http://forums.asp.net/t/1233927.aspx/1 . Also you will then need to do what you want to do in the page load event with a IsPostPack check if you do not want certain events to occur every time the page loads.
otherwise you will need to use a timer control.

1 solution

Yes you can use ASP.Net Timer,,,,
you can use it with update panel, and other ajax extender
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900