2
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 div ID formLogin.
I would like to add the login condition a way to change the display of the div id formLogin
and consecutively display another content after the user logs in.
Since Controller can’t find the div element ID, I tried with Panel
and Literal
tagged runat="server"
but I still couldn’t locate my div to change the properties CSS
.