I am creating a login form simply with a sql datasource.
I have a login page with username textbox, password textbox, and a submit button.
The form also contains the sql datasource
SELECT COUNT(*) AS COUNTOFINFO FROM SOFTECH.TBL_OTUSERS WHERE (USERNAME = :txtUserId) AND ("PASSWORD" = :txtPwd)
The results of this is binded to a listbox.
The code-behind of my login form contains
Dim Count As Integer
If (Count > 0) Then
ElseIf (Count = 0) Then
MsgBox("Incorrect userid and password. Please try again!")
However, only the message box is displayed when I click the submit button and the credentials are entered correctly.