Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi everybody,

I want to use Timer in asp.net 2.0 project, but I do not know how to use it.

Can I use AJAX with Timer or using Thread with it?

I want to update value in database every 5 seconds but just if user is authenticated
then, what is the best approach

And how to do this anyway?
Posted
Updated 11-Nov-11 23:29pm
v3

Try Google[^].
I always find MSDN[^] a good place to start too.
I think with the examples you can find there you should be able to implement the Timer in your ASP project :)
 
Share this answer
 
Comments
MrLonely_2 12-Nov-11 5:30am    
Thanks, i want to update value in database every 5 seconds but just if user is authenticated then, what is the best approach in your oppinion
use of timer either using ajax or thread is depend upon where and how you use it.
http://ajax.net-tutorials.com/controls/timer-control/[^]
 
Share this answer
 
Comments
MrLonely_2 12-Nov-11 5:28am    
Thanks, i want to update value in database every 5 seconds but just if user is authenticated
then, what is the best approach in your oppinion
Sergey Alexandrovich Kryukov 12-Nov-11 22:06pm    
Makes no sense. I would understand if you wanted to poll database, but the update means modification of the data in the database; you need it only when data should be changed.
--SA

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