if (Membership.ValidateUser(UserName.Text, Password.Text))
{
FormsAuthentication.SetAuthCookie(UserName.Text, true);
FormsAuthentication.RedirectFromLoginPage(UserName.Text, true);
Response.Redirect("~/Secured/default.aspx", true);
}
else
{
MyClass.MyAlert(this, "Invalid Login Credentials", "123");
return;
on my web.config i have this
<sessionState timeout="20" cookieless="false"></sessionState>
<customErrors mode="RemoteOnly" defaultRedirect="error.aspx"/>
<authentication mode="Forms">
<forms loginUrl="login.aspx" requireSSL="false" protection="All" timeout="15" slidingExpiration="true" name="auth_cookie"/>
</auth ...
Go to the complete details ...