i try to make simple custom membership provider to my application. i try to use login function to login to my application
whats wrong with my code? why is not redirect to home?/
[HttpPost]
public ActionResult Login(string UserName, string UserPassword)
{
if (Membership.ValidateUser(UserName, UserPassword))
{
return RedirectToAction("Index");
}
return View();
}
public override bool ValidateUser(string username, string password)
{
if (username == "admin" && password == "1234")
{
return true;
}
else
{
return false;
}
}
can someone tell me, which part is wrong??