How to find whether the user clicks browser back button or Refresh button

前端 未结 8 1322
感动是毒
感动是毒 2021-02-07 12:59

I need to find whether the user clicking the browser back button or Refresh button.

I need to redirect the page to Error page when he clicks the back or refresh button.

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-07 13:53

    With Site.Master

    In your Site.Master, put after

    
    
    
    
    

    Without Site.Master

    In your common code, put after

    
    
    

提交回复
热议问题