Click here to Skip to main content
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 23:37pm
Edited 12-Nov-11 0:29am
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 OriginalGriff 6,569
1 Sergey Alexandrovich Kryukov 6,168
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 12 Nov 2011
Copyright © CodeProject, 1999-2014
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