I have the following application to login
public ActionResult Logar(String Login, String Senha)
{
var bdUsuario = ClientesAplicacaoConstrutor.ClientesAplicacaoEF();
var usuario = bdUsuario.ListarTodos().Where(x => x.Codigo == Login && x.Senha == Senha);
if (usuario.Count() == 1)
{
var user = usuario.First();
FormsAuthentication.SetAuthCookie(user.ID.ToString(), false);
}
return RedirectToAction("Index");
}
The entire form is inside a formLogin ID div.
I would like to add the login condition a way to change the display of the div formLogin
and consecutively display other content after the user logs in.
As the Controller can not find the ID of the div element, I tried with Panel
and Literal
with the tag runat="server"
but even then I could not find my div so I change the CSS
properties. / p>