Anu

Anu

  • 1.5k
  • 158
  • 6.9k

where to call windows.onbeforeunload

Sep 4 2024 1:21 PM

I want call windows.onbeforeunload  in an mvc application. I am using same laout page for all the views. I want to execute one logic on the tab/browser close. I tried adding in the layout page, but it gets called each time when moving to different view which uses same layout page. Can some one please suggest the proper place to call the function? 


Answers (1)