Hi,
I'm very nearly there with this. I'm just having a problem with an if statement.
I'm using ASPX and VB with Access
I've created a Username text box (txtUN) and a Password text box (txtPW)
The datasource queries the database for all user names and passwords where username = txtUN and password = txtPW.
I have an if statement on the log in button which is as follows:
Protected Sub btnLogin_Click( ByVal sender As Object, ByVal e As System.EventArg s) Handles btnLogin.Click
If Then
FormsAuthentica tion.SetAuthCoo kie(txtUN.Text, True)
Response.Redire ct("Default.asp x")
Else
lblWrong.Visibl e = True
End If
End Sub
I just don't know what to put after the if so that when the button is pressed it checks the datasource to see if it meets the query..
Can anyone help, please?!
Tom
I'm very nearly there with this. I'm just having a problem with an if statement.
I'm using ASPX and VB with Access
I've created a Username text box (txtUN) and a Password text box (txtPW)
The datasource queries the database for all user names and passwords where username = txtUN and password = txtPW.
I have an if statement on the log in button which is as follows:
Protected Sub btnLogin_Click( ByVal sender As Object, ByVal e As System.EventArg s) Handles btnLogin.Click
If Then
FormsAuthentica tion.SetAuthCoo kie(txtUN.Text, True)
Response.Redire ct("Default.asp x")
Else
lblWrong.Visibl e = True
End If
End Sub
I just don't know what to put after the if so that when the button is pressed it checks the datasource to see if it meets the query..
Can anyone help, please?!
Tom