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 ThenCurrentTime = Format(Now,
"hh:mm") ElseCurrentTime = Format(Now,
"hh:mm:ss") End If End SubEnd
ClassI 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
Charles pPosted Jul 28, 2008, 4:34 PM
Ok,
I got it to work, as long as i do it in the main page. But when i try to do it in my footer page(web user control), it doesnt work. I am going to try to make the user control over and see if that fixes the problem
Charles pPosted Jul 28, 2008, 11:00 AM
Bechir BejaouiPosted Jul 26, 2008, 2:18 PM
Bechir BejaouiPosted Jul 26, 2008, 2:18 PM
Bechir BejaouiPosted Jul 26, 2008, 2:18 PM
Bechir BejaouiPosted Jul 26, 2008, 2:18 PM