Hi,
I am new to Form Authentication. I want to check if the username and password is correct, then the user will redirect to Default.aspx otherwise still in Login.aspx
In web.config
<authentication mode="Forms">
<forms loginUrl="Login.aspx" defaultUrl="Default.aspx" timeout="1800">
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
I am not using Login controls. Just place two textbox and button.
In Login.aspx.cs
protected void btnLogin_Click(object sender, EventArgs e)
{
AdminLogin objad = AdminLogin.GetAdminLogin(txtUserName.Text.Trim());
if (objad == null)
{
}
else
{
if (objad.Password == txtPassword.Text.Trim())
...
Go to the complete details ...