S
Stephen
Hi,
I dont know whether I am doing this correctly or not. I want some procedure
to fire when the time b/w the last and the current request is > 15 min
I declared a global variable (txtPrev as string) and set it initially to
datetime.now (tostring) and the clicked event of a button compare that
datetime.now - prevtime.. but the global variable has nothing in it... why?
I thought it would be set when declared globally for some reason its null
(either my understanding is totally wrong or something is screwed up
If newDateTime.Now.Subtract(DateTime.Parse(txtPrev)).TotalMinutes > 2 Then
<-- error out here
else
end if
I TRY THIS TOO... BUT DOES NOT WORK EITHER
I have no understanding of Property but thought I would try... please do
help me in understanding this
Public Property X() As DateTime
Get
Return X
End Get
Set(ByVal Value As DateTime)
X = Value
End Set
End Property
Suppose during page load I do this t_PrevTime = X.Now
and then while comparing at the clicked_event why does it take the value of
#12.00 AM#
If prevDateTime.Now.Subtract(X).TotalMinutes > 2 Then <--- thought it
should set X to X.Now
else
Endif
Please advice... I feel as if I am doing this in worst possible way, if
there is a better way please do let me know.
Thanks in Advance,
Stephen
I dont know whether I am doing this correctly or not. I want some procedure
to fire when the time b/w the last and the current request is > 15 min
I declared a global variable (txtPrev as string) and set it initially to
datetime.now (tostring) and the clicked event of a button compare that
datetime.now - prevtime.. but the global variable has nothing in it... why?
I thought it would be set when declared globally for some reason its null
(either my understanding is totally wrong or something is screwed up
If newDateTime.Now.Subtract(DateTime.Parse(txtPrev)).TotalMinutes > 2 Then
<-- error out here
else
end if
I TRY THIS TOO... BUT DOES NOT WORK EITHER
I have no understanding of Property but thought I would try... please do
help me in understanding this
Public Property X() As DateTime
Get
Return X
End Get
Set(ByVal Value As DateTime)
X = Value
End Set
End Property
Suppose during page load I do this t_PrevTime = X.Now
and then while comparing at the clicked_event why does it take the value of
#12.00 AM#
If prevDateTime.Now.Subtract(X).TotalMinutes > 2 Then <--- thought it
should set X to X.Now
else
Endif
Please advice... I feel as if I am doing this in worst possible way, if
there is a better way please do let me know.
Thanks in Advance,
Stephen