Visual studio 2012 is warning that the first line of this class is obsolete:
if (FormsAuthentication.Authenticate(UserName.Text, Password.Text) == true)
public void LoginClass(object s, EventArgs e)
{
if (FormsAuthentication.Authenticate(UserName.Text, Password.Text) == true)
{
FormsAuthentication.SetAuthCookie(UserName.Text, true);
Response.Redirect("admin/default.aspx");
}
else
{
if (DBAuthenticate(UserName.Text, Password.Text))
{
FormsAuthentication.SetAuthCookie(UserName.Text, true);
Response.Redirect("members/default.aspx");
}
else
{
LtlLogin.Text = "<p>Sorry wrong login details</p>";
}
}
}
I would appreciate some help. With what should I replace such line of code in framework 4.5 ?