| | |
recording date and time a link is clicked
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
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.
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.
Formerly known as Slade.
•
•
Join Date: May 2004
Posts: 3
Reputation:
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?
![]() |
Similar Threads
- 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 Minimize application to Task bar/near date/time ? (Visual Basic 4 / 5 / 6)
- delayed page refresh when link is clicked (HTML and CSS)
- Phas: IE 6 Can't open new windows from link clicked (Web Browsers)
- Setting system date and time using c++ (C++)
- Date and Time Picker (Windows NT / 2000 / XP)
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
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net bc30451 beginner bottomasp.net box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datagridviewcheckbox datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol fileuploader findcontrol flash flv forms gridview gudi homeedition iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings redirect registration relationaldatabases rotatepage save search security serializesmo.table sessionvariables silverlight smartcard sql ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment wizard xml





