As when clicking on Details the user is redirected to another View, uma alternativa é você passar os valores informados no(s) filtro(s) da consulta quando o usuário clicar na opção de ver os detalhes do cadastro.
Example of a link Details to pass filter values on View that displays the result of the query:
@Html.ActionLink("Detalhe", "Detalhes", "SeuController", new
{
id = model.Id,
filtro1 = model.filtro1,
filtro2 = model.filtro2
})
Receiving these values entered in the query filter(s) when the user clicks on Details, you can reload the previous screen (containing the results of the query) when the user clicks on "back" your Details View.
Example in Controller how to receive filter values:
[HttpPost]
public ActionResult Detalhes(int id, string filtro1, int filtro2)
{
var model = new DetalhesViewModel(id, filtro1, filtro2);
// Carrega o model/sua partial com os dados dos filtros informados
...
}
Now, in your View of Details you have the values of the filters and you can pass them as parameter in your link "Back" to reassemble your View as a result of the consultation:
Example View: Passing the values of the filters in the link Back to reassemble the query screen
@Html.ActionLink("Voltar", "Consulta", "SeuController", new
{
filtro1 = model.filtro1,
filtro2 = model.filtro2
})
Example Controller of the query receiving filter values:
[HttpGet]
public ActionResult Consulta(string filtro1, int filtro2)
{
// Carrega o model aproveitando os filtros
var model = new ConsultaViewModel(filtro1, filtro2);
return View(model);
}