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?.

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 = Timevisited
End Sub

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

Thanks,

Slade.

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?