Click to See Complete Forum and Search --> : Syntax error?


martha
02-02-2005, 04:10 PM
Please, check this code:

<%
if dsAdminLogin.RecordCount > 0 then
Session("sessAdminUserName") = Request.Form("tfUsername")
FormsAuthentication.RedirectFromLoginPage ("admin", true)
else if ((Request.Form("tfUsername"))) <> Nothing
or ((Request.Form("tfPassword"))) <> Nothing
response.Write("Login failed. Please try again.")
end if
%>

When I try to browse the page, I get this error:
Compiler Error Message: BC30035: Syntax error.

Is there anything with my syntax?
Thanks in advance!
:)

Exuro
02-02-2005, 10:16 PM
I think you need a Then after your else if.

PeOfEo
02-02-2005, 10:46 PM
Not a then right after a else if, a then right after the or. I would suggest bringing the or up to the line above it, that might possibly throw an error too.