MVC Back button issue

前端 未结 2 416
情话喂你
情话喂你 2021-01-03 16:57

I have an action method that I need to execute when the back button is clicked. I\'ve done this before by disabling the cache in my action method (Response.Cache.SetCacheabi

2条回答
  •  梦毁少年i
    2021-01-03 17:31

    There is no way to know, on the server side, if the page request was the result of the back button or not.

    More than likely, the previous request was a post rather than a get, and the post requires that you repost the data.

提交回复
热议问题