There are two types of session events available in asp.net
you can handle both this event in global.asax file of your web application. When a new session initiatesession_start event raised and Session_End event raised when a session is abandoned or expired.
void Session_Start(object sender, EventArgs e)
// Code that runs when a new session is started
void Session_End(object sender, EventArgs e)
// Code that runs when a session ends.