Authentication in Asp.net with C#
Hi
Please help me
After entering username and password the control goes to response.redirect but it is not redirecting to the required page instead it remains in the login page only
login page code
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
string usname = Login1.UserName.ToString();
string pass = Login1.Password.ToString();
if (usname == "anand" && pass == "anand")
{
Response.Redirect("Default3.aspx");
}
}
web.config file code
<authentication mode="Forms">
<forms loginUrl="login.aspx" protection="All">
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>