Click here to Skip to main content
11,706,007 members (54,593 online)
Rate this: bad
good
Please Sign up or sign in to 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 11-Nov-11 22:37pm
Edited 11-Nov-11 23:29pm
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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 Smile | :)
  Permalink  
Comments
MrProgrammer_78 at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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/[^]
  Permalink  
Comments
MrProgrammer_78 at 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
SAKryukov at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 151
1 OriginalGriff 151
2 Mika Wendelius 70
3 ppolymorphe 61
4 chainerlt 60
0 OriginalGriff 9,050
1 Sergey Alexandrovich Kryukov 8,417
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,636


Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 12 Nov 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100