3
Answers

using atatement

manohar vakkala

manohar vakkala

14y
2.1k
1
How to use an using statement?

this question is not related to using keyword which is used to import the class using namespace.

Be specific when u give me an answer bcoz it is an interview question.

Thanks
Answers (3)
2
Manav Pandya

Manav Pandya

NA 7.1k 24k 7y
Hello 
 
I have best article link for you :
 
Surely i can say it will help you somehow :
 
https://www.codeproject.com/Tips/566217/Session-killing-logout-in-server-when-browser-is-c
 
http://www.dotnetspider.com/forum/342428-end-session-or-kill-session-when-browser-closed-in-aspnet.aspx
 
Thanks
2
Dharmraj Thakur

Dharmraj Thakur

NA 4.1k 61.7k 7y
You can refer my article, It may help you which doing some work after closing tab...
 
http://www.c-sharpcorner.com/article/run-background-task-using-hostingenvironment-queuebackgroundworkitem-net-framew/ 
1
Dharmraj Thakur

Dharmraj Thakur

NA 4.1k 61.7k 7y
Hi Rohit,
 
You should implement auto logout timeout in your application like idle session expire after 1 or 2 hours and update the database flag status.
 
Or
 
You can create async service  which calls after every 5 to 10 min to check user existance, if user not exist then update your flag.
1
ROHIT SINHA

ROHIT SINHA

NA 10 325 7y
Right now I am not using session but I want to achieve it by session if you have any reference or link then please provide me 
1
Manav Pandya

Manav Pandya

NA 7.1k 24k 7y
Please provide more detail or snippet 
 
And if you are using session , than write following in PageLoad() method as :
  1. AbandonSession()  
And make flag = false ; by default  
 
Thanks