Hi,
I am newbie, so please bear with with me. I have this big web app project I just started working on and i want to add the current date and time to my footer page. I created this procedure:
Public
Class CurrentTime
Public Sub GetCurrentTime(ByRef CurrentTime As String, Optional ByVal IncludeSeconds As Boolean = True)
If IncludeSeconds = False Then
CurrentTime = Format(Now,
"hh:mm")
Else
CurrentTime = Format(Now,
"hh:mm:ss")
End If
End Sub
End
Class
I created a CurrentTime.vb class file and place it there and then I try putting the following code in the footer.ascx.vb to call the procedure:
GetCurrentTime.GetCurrentTime(test,
False)
lbTodayDate.Text = DateAdd(DateInterval.Minute, 2, Now).ToString("HH:MM")
but nothing happens, then i try putting anything in the label by putting this code in the footer.ascx.vb:
lbTodayDate.Text =
"hI"
but still nothing happens. So where do i put code when i want a label.text to equals something?
am i putting my call and my procedure in the right places?
Please help.
Thanks in advance,
-Charles