farshad Posted January 15, 2004 Posted January 15, 2004 Hi all, There is a timer control on my webform which is in asp.net It checks every 1000 milliseconds for the time to be 9.15 At this time it does the required processes (i.e. GetData()) Do u know why sometimes the GetData() does not get triggered? even at 9.15? Here is the code: Private Sub tmr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmr.Tick StartTimer() End Sub Private Sub StartTimer() Dim intDay As Integer Dim intSysHour As Integer Dim intSysMin As Integer Dim intSetHour As Integer Dim intSetMin As Integer intSysHour = Now.Hour.ToString intSysMin = Now.Minute.ToString intSetHour = hsbHour.Value intSetMin = hsbMin.Value intDay = DateTime.Now.DayOfWeek If Not (intDay = 6 Or intDay = 7) Then '6 and 7 represent saturday and sunday respectively... If (intSysHour = intSetHour And intSysMin = intSetMin) Then tmr.Enabled = False 'Once the process has started, turn off the timer... GetData() End If End If End Sub Quote Farshad
Moderators Robby Posted January 15, 2004 Moderators Posted January 15, 2004 You need to implement a client side time. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.