I'm trying to get back to the previous page, like this:
string urlAnterior = Request.Headers["Referer"].ToString();
if (urlAnterior.Contains("Pagina"))
return RedirectToAction("");
else
return RedirectToAction("");
But it returns me to the current updated page, I need to go back to the previous page, how to proceed?
Code that I use to call create inside people:
<div class="form-group">
<a asp-page="/ContaReceber/Create" asp-route-id="@Request.Query[" id "]" class="btn btn-primary btn-sm">Criar nova Conta</a>
</div>
And here is where I call within the Accounts Receivable Index:
<a asp-page="Create" class="btn btn-primary">Criar nova Conta</a>