create(behind the code) serverside code for timer in asp.net

Posted by Dn2010 under ASP.NET on 1/10/2011 | Points: 10 | Views : 11923 | Status : [Member] | Replies : 3
hi friends,

how to create(behind the code) serverside code for timer in asp.net.

thanks.




Responses

Posted by: SheoNarayan on: 1/10/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
What is your requirement Dn2010?

There can be more than one way to solve your problem and how you do it is based on your requirement. There is a timer class in C# that you can use however not sure if that fits you scenario, if you are working with ASP.NET, you may use ASP.NET AJAX timer control or even through jQuery or JavaScript you can fire the event after specified interval.

For C# timer, look at this http://msdn.microsoft.com/en-us/library/system.timers.timer(v=vs.71).aspx
For ASP.NET AJAX timer read this http://www.dotnetfunda.com/tutorials/ajax/timer.aspx
For jQuery or JavaScript timer, you can read this http://www.dotnetfunda.com/articles/article1073-jquery-slideshow--cute-and-simple-.aspx.

Hope this helps

Thanks!

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Dn2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/10/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi Dn2010,

Check the below links

http://www.dotnetspider.com/resources/901-How-use-Timer-server-side-scripts.aspx

http://www.c-sharpcorner.com/UploadFile/rizialagesann/servertimercallback11172006093742AM/servertimercallback.aspx

As sheo narayan mentioned in the previous post it has many ways to handle the timer like Server side, Client side using AJAX, jScript, Jquery. But its always better to maintain in the client side of at all any time durations are not required to log into the DB. so this way there may be a lot of performance gain.

Thanks
Karthik
www.f5Debug.net

Dn2010, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Suresh.mekkattil on: 1/10/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

You can create ASP.Net Timer control for your time handling from the server.

You can also write code for time tick in that control.

-----
Suresh M

Dn2010, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response