Reputation: 1
in my Razor app I am trying to make back redirections to previous pages. I find good solution from this post https://stackoverflow.com/a/42228327/6485612 using Request.Headers["Referer"]
, however, the problem is how to remember the previous backUrl of the previous page. When i want to go two pages back, I end up in a loop between two pages I was lastly on.
Do you have any ideas how to achieve to go multiple pages back?
Upvotes: 0
Views: 833
Reputation: 81
you can use
Use @Html.ActionLink("Go Back","Actio Name","Controller Name")
or you can use javascript adding a back button
<button onclick="window.history.back()">Back</button>
Upvotes: 1