Is there any way to know that user leaving a page with asp.net?

后端 未结 5 1941
遥遥无期
遥遥无期 2020-12-10 08:54

My question is a little bit tricky. at least I think. Maybe not, anyway. I want to know if there\'s any way to know if the user is leaving the page. Whatever if he clicks \"

5条回答
  •  醉酒成梦
    2020-12-10 09:22

    There really is no way to do it. No event is fired when the browser goes back.

    You can do it with Javascript, but it is difficult at best.

    See the question here.

    This script will also work. It was found here

     
    

提交回复
热议问题