1
Answer

Asp.Net Core 2.0 and JQuery - Issue (Browser Close) Event

Pramod Singh

Pramod Singh

6y
693
1
Hi Team,
 
I have created online exam solution and i need to capture timer data and save in to Database while user close browser or close Tab. (in IE, Crome, Firefox).
 
Technology : Asp.Net Core 2.0
 
I have tried :
 
1. $(window).on('unload', function () { });
 
2.
  1. $(window).bind('beforeunload'function(){CallMyControllerAction(); return 'Are you sure you want to leave?'; });  
But Not working.
 
Note: I have display question page show inside iframe.
 
Please help.
Answers (1)