•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 426,640 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,596 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 3362 | Replies: 1
![]() |
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?.
What code do I need to use to get the date and time?
Thanks,
Slade.
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.
Formerly known as Slade.
•
•
Join Date: May 2004
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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?
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?
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- IE6 open a BlanK Page if a link is clicked or open in a new window is selected (Web Browsers)
- Get a life time link for $10 (Ad Space for Sale)
- How to get the link that was clicked even after the page gets refreshed (JSP)
- How to get the link that was clicked even after the page gets refreshed (JavaScript / DHTML / AJAX)
- How to Get Last Accessed/Created/Modified File Date and Time (C)
- delayed page refresh when link is clicked (HTML and CSS)
- inputing system("date /t") and system("time /t") into a file (C++)
- Phas: IE 6 Can't open new windows from link clicked (Web Browsers)
Other Threads in the ASP.NET Forum
- Previous Thread: Server delay - with html, asp, aspx pages
- Next Thread: Install and Run Win app from Web


Linear Mode