I Know that when a session is running on a web page after login, the session ends when user logs out or when the browser is closed, i want to know how to trigger a method when the session ends on browser close.
Asked
Active
Viewed 1,544 times
-1
-
1Welcome to StackOverflow! As @gleng has pointed out, this question has already been asked. In fact, a web search of "c# session end" would have taken you to that same post here. There is a great wealth of knowledge and experience here for you to peruse. And as I've discovered for myself, I'm seldom the first person to encounter a particular issue. – Bob Kaufman Dec 18 '13 at 13:46
1 Answers
5
You can call it in Session_End
method in global.asax.
void Session_End(Object sender, EventArgs E)
{
// Call your method
}

Ric
- 12,855
- 3
- 30
- 36

Adarsh Shah
- 6,755
- 2
- 25
- 39