Advertisement
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
---- Loging Button on click ---
If DBConnection(txtuserid.Text.Trim(), txtpassword.Text.Trim()) Then
Session("Logged_IN") = "Yes" ' ||||| Use to Validate on other pages in the application
Dim aCookie As New HttpCookie("fud_info")
aCookie.Values("userid") = "John Doe"
aCookie.Values("lastVisit") = DateTime.Now.ToString()
aCookie.Expires = DateTime.Now.AddHours(4)
Response.Cookies.Add(aCookie)
Response.Redirect("default.aspx")
---- master file on load event ----
Dim dtNow As DateTime = DateTime.Now
Dim currentdt As Label
currentdt.Text = dtNow
Dim userid As Label
Dim lastvisited As Label
userid.Text = Request.Cookies("fud_info")("userid")
lastvisited.Text = Request.Cookies("fud_info")("lastVisit")
|
|
Loading Advertisement... |