login page problem
-
i have a login page wid login check up loop as if (userType.Equals("Administrator")) { Response.Redirect("successPage.aspx"); } else if (!userType.Equals("Administrator")) { errMessage.Text = " Login Incorrect!! " ; } login works well with correct details as needed ..but if i enter wrong details.. it displays nothing.. i want to display text above... how to do this ??
-
i have a login page wid login check up loop as if (userType.Equals("Administrator")) { Response.Redirect("successPage.aspx"); } else if (!userType.Equals("Administrator")) { errMessage.Text = " Login Incorrect!! " ; } login works well with correct details as needed ..but if i enter wrong details.. it displays nothing.. i want to display text above... how to do this ??
I'm not sure why the message is not displayed. But why are you using an
else if
? If the user is an admin it will pass through the firstif
. If it gets to theelse
part then we already know they're not an admin, there should be no need to check again.My current favourite word is: PIE! Good ol' pie, it's been a while.
-
I'm not sure why the message is not displayed. But why are you using an
else if
? If the user is an admin it will pass through the firstif
. If it gets to theelse
part then we already know they're not an admin, there should be no need to check again.My current favourite word is: PIE! Good ol' pie, it's been a while.