save logout time when the browser close

Posted by Swaroopa under C# on 6/26/2012 | Points: 10 | Views : 2746 | Status : [Member] | Replies : 3
Hi,

i want to save log out time while closing browser using c#.net

Swaroopa


Responses

Posted by: Siva524 on: 6/26/2012 [Member] Starter | Points: 25

Up
0
Down
suppose you have close button in your application then we need one thing that is
in that button click event
write like this
label1.text=DateTime.Now.ToString("dd/MM/yyyy");
that's enough to save time in your application.
  btn_click()

{
label1.text=DateTime.Now.ToString("dd/MM/yyyy");
application.exit();
}


Swaroopa, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bhupentiwari on: 6/27/2012 [Member] Starter | Points: 25

Up
0
Down
Suppose if close will not there then How to do in case ASP.net Web application

Thanks n Regards
Bhupendra Tiwari

Swaroopa, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jeffie on: 6/29/2012 [Member] Starter | Points: 25

Up
0
Down
You can acheive this in Session End Event in the Global.ascx Files
Which get fired when the browser is closed

Thanks
http://www.alacraft.com.au/

Swaroopa, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response