Pramod Singh

Pramod Singh

  • 1.2k
  • 389
  • 31.8k

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

May 14 2018 7:32 AM
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)