How to use session events and timeout in ASP.NET?

Tripati_tutu
Posted by Tripati_tutu under ASP.NET category on | Points: 40 | Views : 3056
Basically a Session is having two types of events. That are

1: Session_Start
void Session_Start(object sender, EventArgs ee) 
{
// This set of code will execute when the session starts.
}

2: Session_End
void Session_End(object sender, EventArgs ee) 
{
// This set of code will execute when the session ends.
}


You can also set the TimeOut for a Session. That is
Session.TimeOut=50;
Here the Session will keep your session value for 50 minutes, after that it will automatically clear the session value.

Comments or Responses

Login to post response