Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public void Init(HttpApplication application)
  2. {
  3. application.PostRequestHandlerExecute += application_PostRequestHandlerExecute;
  4. SessionStateModule session = (SessionStateModule)application.Modules["Session"];
  5. session.Start += session_Start;
  6. session.End += session_End;
  7. }
  8.  
  9. void session_End(object sender, EventArgs e)
  10. {
  11. Visitor visitor = HttpContext.Current.Session["visitor"] as Visitor;
  12.  
  13. if (visitor != null)
  14. {
  15. foreach (PageItem page in visitor.Pages)
  16. {
  17. page.UpdatePageViews();
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement