0

Sorry if this question has already been asked before but I couldn't find the answer so far.

I have 2 partial views updated according to searches results and from which I can access one "details" page. On that page, I have a "Back to previous page" action link (that I found here: How do I redirect to the previous action in ASP.NET MVC?):

@Html.ActionLink("Back to previous page", null, null, null, new { href = Request.UrlReferrer})

The thing is that I need to redirect to the previous page but keep the results of the search I made on it. Is there any best practices to do that? Any help or even hint is appreciated :) Thanks!

Community
  • 1
  • 1
Pookye
  • 89
  • 1
  • 3
  • 13

1 Answers1

1

For those interested:

@Html.ActionLink("Back to previous page", null, null, null, new { onclick = "history.go(-1);"})

The answer proposed in the post Onclick javascript to make browser go back to previous page? was given with the input tag.

Community
  • 1
  • 1
Pookye
  • 89
  • 1
  • 3
  • 13