if (Membership.ValidateUser(UserName.Text.Trim() , Password.Text.Trim()))
{
FormsAuthentication.RedirectFromLoginPage(UserName.Text.Trim(), false);
Response.Redirect("~/Projects.aspx");
}
}
else
{
Response.Write("Input correct User Name and Password!");
}
the above codes first validate a user with user name and password then
redirects the user to Projects.aspx page by logging in the user.