954,184 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

recording date and time a link is clicked

Hey all, I just wanna know how to record the time and day a link on my website is clicked to a label, what code do I need to use to get the date and time?.

PrivateSub lnkVac_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lnkVac.Click
 
Dim Timevisited as string
Response.Redirect("Vacancies.aspx")
label1.text = Timevisited
EndSub


What code do I need to use to get the date and time?

Thanks,

Slade.

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

Hi,

I'm not sure what you're trying to do here.... Could you just use something like...

Private Sub lnkVac_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lnkVac.Click

'Dim Timevisited as string
'Response.Redirect("Vacancies.aspx")

label1.text = Now()

End Sub

You could change the Now() bit with Today() or TimeOfDay() to get just the date or just the time if need be. :eek:

Also, if you have the Now() bit after your response redirect, how will the label get set?

Billy_
Newbie Poster
3 posts since May 2004
Reputation Points: 46
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You