I have the following situation, in my _Layout I'm checking:
@{
var controller = HttpContext.Current.Request.RequestContext.RouteData.Values["Controller"].ToString();
var view = HttpContext.Current.Request.RequestContext.RouteData.Values["action"].ToString();
}
I send this information to the controller so that after changing the language of the page I can go back to it.
<a href="@Url.Action("AlteraIdioma", "Home" , new{LinguagemAbreviada="pt", NomeControler = @controller, NomeView= @view })" >
<img src="~/ContentAdmin/dist/img/brasil-160x160.png" id="pt" class="user-image" alt="brasil">
<span class="hidden-xs">-</span>
</a>
I want to know how I can get the "Id" if I have it.