After the user logs in, two parameters are passed to Controller Home
:
case SignInStatus.Success:
{
//recupera as informações do usuario que corresponda ao usuario e password
var user = await UserManager.FindAsync(model.Usuário, model.Password);
//redireciona o login para o index o controller home
return RedirectToAction("Index", "Home", new {
cod_cli = user.cod_cli,
razao_social = user.razao_social
});
}
However, on another page I have a button that also redirects to Action Index
of Controller Home
:
@Html.ActionLink("OneeWeb", "Index", "Home", new {
area = "",
cod_cli = "parametro1",
razao_social = "parametro2"
}, new { @class = "navbar-brand" })
My question is, how do I recover these parameters? they do not change, they are fixed for each user.
In this case, would it be good to store these parameters in Cookie
?