Guest User

Untitled

a guest
Jun 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. void Session_Start(object sender, EventArgs e)
  2. {
  3. // Code that runs when a new session is started
  4. Session["SessionStartTime"] = DateTime.Now;
  5. }
  6.  
  7. TimeSpan sessionLifeTime = DateTime.Now - (DateTime)Session["SessionStartTime"];
Add Comment
Please, Sign In to add comment